Tested prompt · SQL
Monthly revenue with a running total: every AI model's reply, tested
We sent this hard SQL prompt to all 27 models in llmwise, the same way the app sends a message, and checked every reply the same way. Here's each one as it came, with whether it passed, what it cost and how long it took.
Based on 27 of our test runs on , through OpenRouter with the app's own prompt and settings.
Short answer
All 27 models passed this SQL prompt's check (query result). The cheapest reply that passed was GPT-6 Luna's, at $0.000077; the fastest, Claude Haiku 4.5's in 1.5 s. The dearest reply, Claude Fable 5.1's, cost 332 times as much ($0.0257).
The prompt, as sent, and its check
Checked by query result, the same way for every model.
Monthly revenue with a running total (hard)
[5 lines every SQL prompt of ours shares, word for word: the whole prompt, on the methods page] For each month of 2026 that has orders that weren't cancelled, show the month as YYYY-MM, that month's revenue in dollars from those orders, and the running total of that revenue from January through that month. Order by month. Write one SQLite query and reply with it in a ```sql code block.
The query must return the same rows as this one, on the fixture database below, in the same order:
WITH m AS ( SELECT substr(o.ordered_on, 1, 7) AS month, SUM(oi.quantity * p.price_cents) / 100.0 AS revenue FROM orders o JOIN order_items oi ON oi.order_id = o.id JOIN products p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND o.ordered_on LIKE '2026-%' GROUP BY month ) SELECT month, revenue, SUM(revenue) OVER (ORDER BY month) AS running_total FROM m ORDER BY month
Exactly what this prompt's replies are checked against, with every other prompt of our test runs.
Every model's result
All 27 models on this prompt, in catalog order.
| Model | Result | Cost | Time | Reply |
|---|---|---|---|---|
| Claude Fable 5.2Anthropic | Passed: Returned the right 8 rows. | $0.0195 | 4.4 s | 373 tokens |
| Claude Fable 5.1Anthropic | Passed: Returned the right 8 rows. | $0.0257 | 4.8 s | 400 tokens |
| Claude Opus 5.5Anthropic | Passed: Returned the right 8 rows. | $0.0172 | 6.9 s | 542 tokens |
| Claude Sonnet 5.5Anthropic | Passed: Returned the right 8 rows. | $0.0051 | 2.6 s | 390 tokens |
| Claude Sonnet 5Anthropic | Passed: Returned the right 8 rows. | $0.0052 | 2.6 s | 246 tokens |
| Claude Haiku 5.5Anthropic | Passed: Returned the right 8 rows. | $0.00049 | 3.6 s | 319 tokens |
| Claude Haiku 4.5Anthropic | Passed: Returned the right 8 rows. | $0.0017 | 1.5 s | 198 tokens |
| GPT-6.2 AstraOpenAI | Passed: Returned the right 8 rows. | $0.0129 | 3.6 s | 185 tokens |
| GPT-6 AstraOpenAI | Passed: Returned the right 8 rows. | $0.0101 | 6.4 s | 219 tokens |
| GPT-6.2 SolOpenAI | Passed: Returned the right 8 rows. | $0.0038 | 3.5 s | 215 tokens |
| GPT-6.1 SolOpenAI | Passed: Returned the right 8 rows. | $0.0036 | 3.5 s | 217 tokens |
| GPT-6 SolOpenAI | Passed: Returned the right 8 rows. | $0.0022 | 2.7 s | 196 tokens |
| GPT-6.1 TerraOpenAI | Passed: Returned the right 8 rows. | $0.0011 | 4.5 s | 196 tokens |
| GPT-6 LunaOpenAI | Passed: Returned the right 8 rows. | $0.000077 | 3.2 s | 172 tokens |
| Gemini 4 CarbonGoogle | Passed: Returned the right 8 rows. | $0.0059 | 11.6 s | 230 tokens |
| Gemini 4 ArgonGoogle | Passed: Returned the right 8 rows. | $0.0019 | 10.7 s | 226 tokens |
| Gemini 4 HydrogenGoogle | Passed: Returned the right 8 rows. | $0.0057 | 7.8 s | 232 tokens |
| Gemini 3.1 Pro (preview)Google | Passed: Returned the right 8 rows. | $0.0070 | 8.8 s | 170 tokens |
| Gemini 3.8 FlashGoogle | Passed: Returned the right 8 rows. | $0.00066 | 3.0 s | 201 tokens |
| DeepSeek V4.1 FlashDeepSeek | Passed: Returned the right 8 rows. | $0.00073 | 1.7 s | 141 tokens |
| DeepSeek V4 ProDeepSeek | Passed: Returned the right 8 rows. | $0.0105 | 20.9 s | 181 tokens |
| Grok 4.7xAI | Passed: Returned the right 8 rows. | $0.0107 | 16.0 s | 162 tokens |
| Kimi K3.1 ProMoonshot | Passed: Returned the right 8 rows. | $0.0050 | 6.3 s | 199 tokens |
| Kimi K3Moonshot | Passed: Returned the right 8 rows. | $0.0040 | 4.7 s | 184 tokens |
| GLM 5.3Z.ai | Passed: Returned the right 8 rows. | $0.0017 | 2.1 s | 208 tokens |
| GLM 5.3 FlashZ.ai | Passed: Returned the right 8 rows. | $0.00020 | 2.9 s | 153 tokens |
| Mistral Large 4Mistral | Passed: Returned the right 8 rows. | $0.0027 | 19.2 s | 192 tokens |
Cost: what OpenRouter charged us for the reply. Time: from sending to the whole reply. Reply: its length in tokens, thinking not counted. In llmwise you pay per message, not per token: each of these replies counted as one message on Pro.
Every reply
Every reply passed: here they are from the cheapest up.
GPT-6 Luna
Passed: Returned the right 8 rows.
```sql WITH monthly_revenue AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) / 100.0 AS revenue FROM orders AS o JOIN order_items AS oi ON oi.order_id = o.id JOIN products AS p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' GROUP BY strftime('%Y-%m', o.ordered_on) ) SELECT month, revenue, SUM(revenue) OVER (ORDER BY month) AS running_total FROM monthly_revenue ORDER BY month; ```689 tokens in, 172 out · 3.2 s · $0.0001 · 1 message on Pro · answered by openai/gpt-6-luna via OpenAI ·
GLM 5.3 Flash
Passed: Returned the right 8 rows.
```sql SELECT m.month, m.revenue_dollars, SUM(m.revenue_dollars) OVER (ORDER BY m.month) AS running_total_dollars FROM ( SELECT strftime('%Y-%m', o.ordered_on) AS month, ROUND(SUM(oi.quantity * p.price_cents) / 100.0, 2) AS revenue_dollars FROM orders o JOIN order_items oi ON oi.order_id = o.id JOIN products p ON p.id = oi.product_id WHERE o.status != 'cancelled' AND strftime('%Y', o.ordered_on) = '2026' GROUP BY month ) m ORDER BY m.month; ```714 tokens in, 186 out (33 of them reasoning) · 2.9 s · $0.0002 · 1 message on Pro · answered by z-ai/glm-5.3-flash via Friendli ·
Claude Haiku 5.5
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) AS revenue_cents FROM orders o JOIN order_items oi ON oi.order_id = o.id JOIN products p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND strftime('%Y', o.ordered_on) = '2026' GROUP BY month ) SELECT month, revenue_cents / 100.0 AS revenue, SUM(revenue_cents) OVER (ORDER BY month) / 100.0 AS running_total FROM monthly ORDER BY month; ``` This assumes `ordered_on` is stored in a date format SQLite can parse (such as `YYYY-MM-DD`) and that cancelled orders have status `'cancelled'`.1,111 tokens in, 860 out (541 of them reasoning) · 3.6 s · $0.0005 · 1 message on Pro · answered by anthropic/claude-haiku-5.5 via Anthropic ·
Gemini 3.8 Flash
Passed: Returned the right 8 rows.
```sql WITH monthly_revenue AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) / 100.0 AS revenue FROM orders o JOIN order_items oi ON o.id = oi.order_id JOIN products p ON oi.product_id = p.id WHERE o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' AND o.status != 'cancelled' GROUP BY strftime('%Y-%m', o.ordered_on) ) SELECT month, revenue, SUM(revenue) OVER (ORDER BY month) AS running_total FROM monthly_revenue ORDER BY month; ```761 tokens in, 201 out · 3.0 s · $0.0007 · 1 message on Pro · answered by google/gemini-3.8-flash via Google AI Studio ·
DeepSeek V4.1 Flash
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) / 100.0 AS revenue FROM orders o JOIN order_items oi ON oi.order_id = o.id JOIN products p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND strftime('%Y', o.ordered_on) = '2026' GROUP BY month ) SELECT month, revenue, SUM(revenue) OVER (ORDER BY month) AS running_total FROM monthly ORDER BY month; ```736 tokens in, 549 out (408 of them reasoning) · 1.7 s · $0.0007 · 1 message on Pro · answered by deepseek/deepseek-v4.1-flash via Together ·
GPT-6.1 Terra
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT substr(o.ordered_on, 1, 7) AS month, COALESCE(SUM(oi.quantity * p.price_cents), 0) AS revenue_cents FROM orders AS o LEFT JOIN order_items AS oi ON oi.order_id = o.id LEFT JOIN products AS p ON p.id = oi.product_id WHERE o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' AND o.status <> 'cancelled' GROUP BY substr(o.ordered_on, 1, 7) ) SELECT month, revenue_cents / 100.0 AS revenue_dollars, SUM(revenue_cents) OVER (ORDER BY month) / 100.0 AS running_total_dollars FROM monthly ORDER BY month; ```691 tokens in, 293 out (97 of them reasoning) · 4.5 s · $0.0011 · 1 message on Pro · answered by openai/gpt-6.1-terra via OpenAI ·
GLM 5.3
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) / 100.0 AS revenue FROM orders o JOIN order_items oi ON oi.order_id = o.id JOIN products p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND strftime('%Y', o.ordered_on) = '2026' GROUP BY 1 ) SELECT month, revenue, SUM(revenue) OVER (ORDER BY month) AS running_total FROM monthly ORDER BY month; ``` Notes: revenue is computed as quantity × price (in cents) converted to dollars; cancelled orders are excluded; the window function `SUM(...) OVER (ORDER BY month)` gives the running total from January through each month; the CTE filters to 2026, so months with no valid orders simply don't appear.713 tokens in, 359 out (151 of them reasoning) · 2.1 s · $0.0017 · 1 message on Pro · answered by z-ai/glm-5.3 via Friendli ·
Claude Haiku 4.5
Passed: Returned the right 8 rows.
```sql SELECT strftime('%Y-%m', orders.ordered_on) AS month, ROUND(SUM(order_items.quantity * products.price_cents) / 100.0, 2) AS revenue, ROUND(SUM(SUM(order_items.quantity * products.price_cents)) OVER (ORDER BY strftime('%Y-%m', orders.ordered_on)) / 100.0, 2) AS running_total FROM orders JOIN order_items ON orders.id = order_items.order_id JOIN products ON order_items.product_id = products.id WHERE strftime('%Y', orders.ordered_on) = '2026' AND orders.status != 'cancelled' GROUP BY strftime('%Y-%m', orders.ordered_on) ORDER BY month; ```755 tokens in, 198 out · 1.5 s · $0.0017 · 1 message on Pro · answered by anthropic/claude-haiku-4.5 via Anthropic ·
Gemini 4 Argon
Passed: Returned the right 8 rows.
```sql WITH monthly_revenue AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars FROM orders o JOIN order_items oi ON o.id = oi.order_id JOIN products p ON oi.product_id = p.id WHERE o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' AND o.status != 'cancelled' GROUP BY strftime('%Y-%m', o.ordered_on) ) SELECT month, revenue_dollars, SUM(revenue_dollars) OVER ( ORDER BY month ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) AS running_total_dollars FROM monthly_revenue ORDER BY month; ```785 tokens in, 226 out · 10.7 s · $0.0019 · 1 message on Pro · answered by google/gemini-4-argon via Google AI Studio ·
GPT-6 Sol
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT substr(o.ordered_on, 1, 7) AS month, COALESCE(SUM(oi.quantity * p.price_cents), 0) AS revenue_cents FROM orders AS o LEFT JOIN order_items AS oi ON oi.order_id = o.id LEFT JOIN products AS p ON p.id = oi.product_id WHERE o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' AND o.status <> 'cancelled' GROUP BY substr(o.ordered_on, 1, 7) ) SELECT month, revenue_cents / 100.0 AS revenue_dollars, SUM(revenue_cents) OVER (ORDER BY month) / 100.0 AS running_total_dollars FROM monthly ORDER BY month; ```689 tokens in, 309 out (113 of them reasoning) · 2.7 s · $0.0022 · 1 message on Pro · answered by openai/gpt-6-sol via OpenAI ·
Mistral Large 4
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_usd FROM orders o JOIN order_items oi ON oi.order_id = o.id JOIN products p ON p.id = oi.product_id WHERE o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' AND lower(o.status) <> 'cancelled' GROUP BY strftime('%Y-%m', o.ordered_on) ) SELECT month, ROUND(revenue_usd, 2) AS revenue_usd, ROUND(SUM(revenue_usd) OVER (ORDER BY month), 2) AS running_total_usd FROM monthly ORDER BY month; ```715 tokens in, 1,100 out (908 of them reasoning) · 19.2 s · $0.0027 · 1 message on Pro · answered by mistralai/mistral-large-4-0 via Mistral ·
GPT-6.1 Sol
Passed: Returned the right 8 rows.
```sql WITH monthly_revenue AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, COALESCE(SUM(oi.quantity * p.price_cents), 0) AS revenue_cents FROM orders AS o LEFT JOIN order_items AS oi ON oi.order_id = o.id LEFT JOIN products AS p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' GROUP BY strftime('%Y-%m', o.ordered_on) ) SELECT month, revenue_cents / 100.0 AS revenue_dollars, SUM(revenue_cents) OVER ( ORDER BY month ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) / 100.0 AS running_revenue_dollars FROM monthly_revenue ORDER BY month; ```691 tokens in, 217 out · 3.5 s · $0.0036 · 1 message on Pro · answered by openai/gpt-6.1-sol via OpenAI ·
GPT-6.2 Sol
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT substr(o.ordered_on, 1, 7) AS month, COALESCE(SUM(oi.quantity * p.price_cents), 0) AS revenue_cents FROM orders AS o LEFT JOIN order_items AS oi ON oi.order_id = o.id LEFT JOIN products AS p ON p.id = oi.product_id WHERE o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' AND o.status <> 'cancelled' GROUP BY substr(o.ordered_on, 1, 7) ) SELECT month, revenue_cents / 100.0 AS revenue_dollars, SUM(revenue_cents) OVER ( ORDER BY month ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) / 100.0 AS running_revenue_dollars FROM monthly ORDER BY month; ```691 tokens in, 237 out (22 of them reasoning) · 3.5 s · $0.0038 · 1 message on Pro · answered by openai/gpt-6.2-sol via OpenAI ·
Kimi K3
Passed: Returned the right 8 rows.
```sql SELECT strftime('%Y-%m', o.ordered_on) AS month, ROUND(SUM(oi.quantity * p.price_cents) / 100.0, 2) AS revenue, ROUND( SUM(SUM(oi.quantity * p.price_cents)) OVER (ORDER BY strftime('%Y-%m', o.ordered_on)) / 100.0, 2 ) AS running_total FROM orders o JOIN order_items oi ON oi.order_id = o.id JOIN products p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' GROUP BY month ORDER BY month; ```780 tokens in, 204 out (20 of them reasoning) · 4.7 s · $0.0040 · 1 message on Pro · answered by moonshotai/kimi-k3 via Together ·
Kimi K3.1 Pro
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) AS revenue_cents FROM orders AS o JOIN order_items AS oi ON oi.order_id = o.id JOIN products AS p ON p.id = oi.product_id WHERE o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' AND o.status <> 'cancelled' GROUP BY strftime('%Y-%m', o.ordered_on) ) SELECT month, revenue_cents / 100.0 AS revenue_dollars, SUM(revenue_cents) OVER (ORDER BY month) / 100.0 AS running_total_dollars FROM monthly ORDER BY month; ```783 tokens in, 341 out (142 of them reasoning) · 6.3 s · $0.0050 · 1 message on Pro · answered by moonshotai/kimi-k3.1-pro via Together ·
Claude Sonnet 5.5
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) / 100.0 AS revenue FROM orders o JOIN order_items oi ON oi.order_id = o.id JOIN products p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' GROUP BY strftime('%Y-%m', o.ordered_on) ) SELECT month, revenue, SUM(revenue) OVER (ORDER BY month ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS running_total FROM monthly ORDER BY month; ``` Assumptions: cancelled orders have `status = 'cancelled'`, and `ordered_on` is stored as an ISO date/datetime string. Revenue uses the current `price_cents` in `products`, since the schema has no price at time of order.1,112 tokens in, 390 out · 2.6 s · $0.0051 · 1 message on Pro · answered by anthropic/claude-sonnet-5.5 via Anthropic ·
Claude Sonnet 5
Passed: Returned the right 8 rows.
```sql SELECT month, revenue_dollars, SUM(revenue_dollars) OVER (ORDER BY month) AS running_total_dollars FROM ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars FROM orders o JOIN order_items oi ON oi.order_id = o.id JOIN products p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND strftime('%Y', o.ordered_on) = '2026' GROUP BY month ) ORDER BY month; ```1,108 tokens in, 246 out · 2.6 s · $0.0052 · 1 message on Pro · answered by anthropic/claude-sonnet-5 via Anthropic ·
Gemini 4 Hydrogen
Passed: Returned the right 8 rows.
```sql WITH monthly_revenue AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, COALESCE(SUM(oi.quantity * p.price_cents), 0) / 100.0 AS revenue_dollars FROM orders o LEFT JOIN order_items oi ON oi.order_id = o.id LEFT JOIN products p ON p.id = oi.product_id WHERE o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' AND o.status != 'cancelled' GROUP BY month ) SELECT month, ROUND(revenue_dollars, 2) AS revenue_dollars, ROUND(SUM(revenue_dollars) OVER (ORDER BY month ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW), 2) AS running_total_dollars FROM monthly_revenue ORDER BY month; ```785 tokens in, 1,365 out (1,133 of them reasoning) · 7.8 s · $0.0057 · 1 message on Pro · answered by google/gemini-4-hydrogen via Google AI Studio ·
Gemini 4 Carbon
Passed: Returned the right 8 rows.
```sql WITH monthly_cents AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, COALESCE(SUM(oi.quantity * p.price_cents), 0) AS revenue_cents FROM orders o LEFT JOIN order_items oi ON oi.order_id = o.id LEFT JOIN products p ON p.id = oi.product_id WHERE strftime('%Y', o.ordered_on) = '2026' AND LOWER(o.status) NOT IN ('cancelled', 'canceled') GROUP BY strftime('%Y-%m', o.ordered_on) ) SELECT month, revenue_cents / 100.0 AS monthly_revenue, SUM(revenue_cents) OVER ( ORDER BY month ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) / 100.0 AS running_total_revenue FROM monthly_cents ORDER BY month; ```785 tokens in, 1,020 out (790 of them reasoning) · 11.6 s · $0.0059 · 1 message on Pro · answered by google/gemini-4-carbon via Google AI Studio ·
Gemini 3.1 Pro
Passed: Returned the right 8 rows.
```sql WITH monthly_revenue AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(p.price_cents * oi.quantity) / 100.0 AS revenue_dollars FROM orders o JOIN order_items oi ON o.id = oi.order_id JOIN products p ON oi.product_id = p.id WHERE o.ordered_on LIKE '2026-%' AND o.status != 'cancelled' GROUP BY month ) SELECT month, revenue_dollars, SUM(revenue_dollars) OVER (ORDER BY month) AS running_total FROM monthly_revenue ORDER BY month; ```761 tokens in, 1,042 out (872 of them reasoning) · 8.8 s · $0.0070 · 1 message on Pro · answered by google/gemini-3.1-pro-preview via Google AI Studio ·
GPT-6 Astra
Passed: Returned the right 8 rows.
```sql WITH monthly_revenue AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, COALESCE(SUM(oi.quantity * p.price_cents), 0) AS revenue_cents FROM orders AS o LEFT JOIN order_items AS oi ON oi.order_id = o.id LEFT JOIN products AS p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' GROUP BY strftime('%Y-%m', o.ordered_on) ) SELECT month, revenue_cents / 100.0 AS revenue_dollars, SUM(revenue_cents) OVER ( ORDER BY month ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) / 100.0 AS running_revenue_dollars FROM monthly_revenue ORDER BY month; ```689 tokens in, 268 out (49 of them reasoning) · 6.4 s · $0.0101 · 1 message on Pro · answered by openai/gpt-6-astra via OpenAI ·
DeepSeek V4 Pro
Passed: Returned the right 8 rows.
```sql WITH monthly_cents AS ( SELECT substr(o.ordered_on, 1, 7) AS month, COALESCE(SUM(p.price_cents * oi.quantity), 0) AS revenue_cents FROM orders o LEFT JOIN order_items oi ON oi.order_id = o.id LEFT JOIN products p ON p.id = oi.product_id WHERE substr(o.ordered_on, 1, 4) = '2026' AND lower(o.status) <> 'cancelled' GROUP BY substr(o.ordered_on, 1, 7) ) SELECT month, revenue_cents / 100.0 AS revenue, SUM(revenue_cents) OVER (ORDER BY month) / 100.0 AS running_total FROM monthly_cents ORDER BY month; ```707 tokens in, 2,492 out (2,311 of them reasoning) · 20.9 s · $0.0105 · 1 message on Pro · answered by deepseek/deepseek-v4-pro-0813 via CoreWeave ·
Grok 4.7
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) / 100.0 AS revenue FROM orders AS o JOIN order_items AS oi ON oi.order_id = o.id JOIN products AS p ON p.id = oi.product_id WHERE o.status != 'cancelled' AND strftime('%Y', o.ordered_on) = '2026' GROUP BY strftime('%Y-%m', o.ordered_on) ) SELECT month, revenue, SUM(revenue) OVER (ORDER BY month) AS running_total FROM monthly ORDER BY month; ```1,936 tokens in, 1,434 out (1,272 of them reasoning) · 16.0 s · $0.0107 · 1 message on Pro · answered by x-ai/grok-4.7 via xAI ·
GPT-6.2 Astra
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, COALESCE(SUM(oi.quantity * p.price_cents), 0) AS revenue_cents FROM orders AS o LEFT JOIN order_items AS oi ON oi.order_id = o.id LEFT JOIN products AS p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' GROUP BY month ) SELECT month, revenue_cents / 100.0 AS revenue_dollars, SUM(revenue_cents) OVER (ORDER BY month) / 100.0 AS running_revenue_dollars FROM monthly ORDER BY month; ```691 tokens in, 185 out · 3.6 s · $0.0129 · 1 message on Pro · answered by openai/gpt-6.2-astra via OpenAI ·
Claude Opus 5.5
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, COALESCE(SUM(oi.quantity * p.price_cents), 0) AS revenue_cents FROM orders AS o LEFT JOIN order_items AS oi ON oi.order_id = o.id LEFT JOIN products AS p ON p.id = oi.product_id WHERE o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' AND lower(o.status) <> 'cancelled' GROUP BY month ) SELECT month, ROUND(revenue_cents / 100.0, 2) AS revenue_dollars, ROUND(SUM(revenue_cents) OVER (ORDER BY month ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) / 100.0, 2) AS running_total_dollars FROM monthly ORDER BY month; ``` **Assumptions:** - `ordered_on` is stored as ISO text, like `2026-03-15` or `2026-03-15 10:00:00`. - A cancelled order has the status `cancelled`. The comparison ignores case. - Revenue uses each product's current `price_cents`, because the schema has no price recorded at the time of the order. - Totals are added up in cents and only converted to dollars at the end, so no rounding errors build up. - A month whose non-cancelled orders have no items still appears, with $0 revenue.1,110 tokens in, 741 out (199 of them reasoning) · 6.9 s · $0.0172 · 1 message on Pro · answered by anthropic/claude-opus-5.5 via Azure ·
Claude Fable 5.2
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) AS revenue_cents FROM orders o JOIN order_items oi ON oi.order_id = o.id JOIN products p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' GROUP BY month ) SELECT month, revenue_cents / 100.0 AS revenue, SUM(revenue_cents) OVER (ORDER BY month) / 100.0 AS running_total FROM monthly ORDER BY month; ``` Assumptions: `ordered_on` is stored in ISO format (`YYYY-MM-DD...`), cancelled orders have `status = 'cancelled'` (adjust the literal if your data uses different casing/spelling), and revenue uses current product prices since no price is stored on order items.1,110 tokens in, 373 out · 4.4 s · $0.0195 · 1 message on Pro · answered by anthropic/claude-fable-5.2 via Google ·
Claude Fable 5.1
Passed: Returned the right 8 rows.
```sql WITH monthly AS ( SELECT strftime('%Y-%m', o.ordered_on) AS month, SUM(oi.quantity * p.price_cents) AS revenue_cents FROM orders o JOIN order_items oi ON oi.order_id = o.id JOIN products p ON p.id = oi.product_id WHERE o.status <> 'cancelled' AND o.ordered_on >= '2026-01-01' AND o.ordered_on < '2027-01-01' GROUP BY month ) SELECT month, ROUND(revenue_cents / 100.0, 2) AS revenue_dollars, ROUND(SUM(revenue_cents) OVER (ORDER BY month ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) / 100.0, 2) AS running_total_dollars FROM monthly ORDER BY month; ``` Assumes cancelled orders have `status = 'cancelled'` and `ordered_on` is an ISO date (`YYYY-MM-DD`), as SQLite convention suggests.1,110 tokens in, 400 out · 4.8 s · $0.0257 · 1 message on Pro · answered by anthropic/claude-fable-5.1 via Google ·
More SQL prompts
The other SQL prompts, each with every model's reply, and the results across all five.
Questions
Which AI does best on “Monthly revenue with a running total”?
All 27 models passed this SQL prompt's check (query result). The cheapest reply that passed was GPT-6 Luna's, at $0.000077; the fastest, Claude Haiku 4.5's in 1.5 s. The dearest reply, Claude Fable 5.1's, cost 332 times as much ($0.0257).
What does a reply to “Monthly revenue with a running total” cost?
Through the models' APIs, what OpenRouter charged us ran from $0.000077 (GPT-6 Luna) to $0.0257 (Claude Fable 5.1) for this prompt. In llmwise you don't pay by the token: a reply like these counts as one message on Pro, whichever model answers.
Claude, GPT, Gemini, DeepSeek, Grok, Kimi, GLM, and Mistral, in one chat.
See what a message costs before you send it. Every plan is month to month: cancel in two clicks. Sign in with an email link, no password.