curl -L -X GET 'https://api.turso.tech/v1/organizations/{organizationSlug}/databases/{databaseName}/stats' \ -H 'Authorization: Bearer TOKEN'
{ "top_queries": [ { "query": "SELECT COUNT(*), CustomerID FROM Orders GROUP BY CustomerID HAVING COUNT(*) > 5;", "rows_read": 123, "rows_written": 4567 } ] }
Fetch the top queries of a database, including the count of rows read and written.
The slug of the organization or user account.
The name of the database.
Successful response
The response is of type object.
object
Was this page helpful?