sql_aggregate
Calculate count, sum, average, min, or max for any column in a Supabase table, with optional filters and grouping for targeted analysis.
Instructions
Execute SQL aggregate functions (COUNT, SUM, AVG, MIN, MAX)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"table": "<table>",
"function": "<function>"
},
"name": "sql_aggregate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name to aggregate | |
| column | No | Column to aggregate (not needed for count) | |
| filters | No | Filters to apply before aggregation (key-value pairs) | |
| function | Yes | Aggregate function (count, sum, avg, min, max) | |
| group_by | No | Column to group by (optional) |