execute_sql
Run SQL SELECT queries for statistical aggregation (COUNT, GROUP BY, SUM, AVG) on chat message and member tables. Returns up to 200 rows.
Instructions
For statistical aggregation ONLY (COUNT, GROUP BY, SUM, AVG). Do NOT use to fetch message content — use get_messages for that. Max 200 rows returned. Available tables: message, member.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID | |
| query | Yes | SQL SELECT query — aggregations only, e.g. COUNT/GROUP BY |