How do I get monthly totals from daily data with AI?
Ask your AI to group the rows by month and sum the value column, and give it a database to do it in. Over MCP it sends one structured query (group by the month, sum the revenue) and gets back one row per month, computed over every order, not a sample pasted into the chat.
Steps
- Connect your assistant to the public demo. It's a read-only instance with 10 million synthetic orders,
so you can try this before you have your own. In Claude Code:
claude mcp add --transport http mcpdata-demo https://demo.mcpdata.org/mcp --header "Authorization: Bearer cdb_live_PkVoldus8qcE-hqffjajNZzQwiA7rTHMoR4RLSAxsCE"
The key is public on purpose: it can only read the demo's sample data. For Claude Desktop, Cursor and other apps, see Connect your AI.
- Ask your question. Give your AI this prompt:
Using mcpdata, show total revenue per month from Demo.Orders, oldest month first.
| order_month | revenue | orders |
|---|---|---|
| 2023-01 | 113,275,870 | 210,648 |
| 2023-02 | 103,228,834 | 192,393 |
| 2023-03 | 115,381,862 | 215,376 |
| 2023-04 | 115,015,348 | 215,018 |
| 2023-05 | 119,810,840 | 222,406 |
| 2023-06 | 120,749,069 | 225,040 |
| 2023-07 | 137,709,259 | 256,648 |
| 2023-08 | 129,423,981 | 242,035 |
| 2023-09 | 123,704,588 | 230,122 |
| 2023-10 | 129,262,994 | 241,317 |
| 2023-11 | 141,445,842 | 265,271 |
| 2023-12 | 164,906,760 | 307,936 |
Synthetic data: the demo's orders are generated, not real customers.
The assistant needs mcpdata connected (step 1) to run the query.
Why this works
Daily (or per-order) data is too long to paste into a conversation, and an AI adding up numbers it reads is slow and error-prone. A GROUP BY in the database is exact and returns only the 36 rows you need. Columns such as order_month make it a plain group-by; with raw timestamps the AI can ask for a month expression in a saved view.