Tested prompt · SQL
Every customer, even those without orders: 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
26 of 27 models passed this SQL prompt's check (query result); GLM 5.3 didn't. The cheapest reply that passed was GPT-6 Luna's, at $0.000058; the fastest, Claude Haiku 4.5's in 1.0 s. The dearest reply, Claude Fable 5.1's, cost 262 times as much ($0.0151).
The prompt, as sent, and its check
Checked by query result, the same way for every model.
Every customer, even those without orders (hard)
[5 lines every SQL prompt of ours shares, word for word: the whole prompt, on the methods page] For every customer, show their name, the date of their first order that wasn't cancelled, and how many orders that weren't cancelled they have. Include customers who have no such orders, with NULL for the date and 0 for the count. Sort by name. 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:
SELECT c.name, MIN(o.ordered_on) AS first_order, COUNT(o.id) AS orders FROM customers c LEFT JOIN orders o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name
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.0137 | 3.5 s | 227 tokens |
| Claude Fable 5.1Anthropic | Passed: Returned the right 8 rows. | $0.0151 | 2.9 s | 187 tokens |
| Claude Opus 5.5Anthropic | Passed: Returned the right 8 rows. | $0.0089 | 3.8 s | 270 tokens |
| Claude Sonnet 5.5Anthropic | Passed: Returned the right 8 rows. | $0.0036 | 2.2 s | 243 tokens |
| Claude Sonnet 5Anthropic | Passed: Returned the right 8 rows. | $0.0043 | 2.4 s | 158 tokens |
| Claude Haiku 5.5Anthropic | Passed: Returned the right 8 rows. | $0.00014 | 1.5 s | 156 tokens |
| Claude Haiku 4.5Anthropic | Passed: Returned the right 8 rows. | $0.0012 | 1.0 s | 90 tokens |
| GPT-6.2 AstraOpenAI | Passed: Returned the right 8 rows. | $0.0086 | 3.0 s | 77 tokens |
| GPT-6 AstraOpenAI | Passed: Returned the right 8 rows. | $0.0054 | 4.0 s | 77 tokens |
| GPT-6.2 SolOpenAI | Passed: Returned the right 8 rows. | $0.0022 | 2.0 s | 77 tokens |
| GPT-6.1 SolOpenAI | Passed: Returned the right 8 rows. | $0.0011 | 13.5 s | 77 tokens |
| GPT-6 SolOpenAI | Passed: Returned the right 8 rows. | $0.0011 | 1.7 s | 77 tokens |
| GPT-6.1 TerraOpenAI | Passed: Returned the right 8 rows. | $0.00054 | 1.3 s | 77 tokens |
| GPT-6 LunaOpenAI | Passed: Returned the right 8 rows. | $0.000058 | 2.4 s | 92 tokens |
| Gemini 4 CarbonGoogle | Passed: Returned the right 8 rows. | $0.0029 | 8.8 s | 95 tokens |
| Gemini 4 ArgonGoogle | Passed: Returned the right 8 rows. | $0.0025 | 16.8 s | 96 tokens |
| Gemini 4 HydrogenGoogle | Passed: Returned the right 8 rows. | $0.0035 | 4.8 s | 95 tokens |
| Gemini 3.1 Pro (preview)Google | Passed: Returned the right 8 rows. | $0.0053 | 8.0 s | 101 tokens |
| Gemini 3.8 FlashGoogle | Passed: Returned the right 8 rows. | $0.00047 | 2.7 s | 96 tokens |
| DeepSeek V4.1 FlashDeepSeek | Passed: Returned the right 8 rows. | $0.00042 | 1.5 s | 123 tokens |
| DeepSeek V4 ProDeepSeek | Passed: Returned the right 8 rows. | $0.0024 | 4.0 s | 76 tokens |
| Grok 4.7xAI | Passed: Returned the right 8 rows. | $0.0036 | 5.3 s | 74 tokens |
| Kimi K3.1 ProMoonshot | Passed: Returned the right 8 rows. | $0.0033 | 3.4 s | 86 tokens |
| Kimi K3Moonshot | Passed: Returned the right 8 rows. | $0.0025 | 3.1 s | 97 tokens |
| GLM 5.3Z.ai | Failed: Returned 8 rows that don't match the expected 8 (in order). | $0.00071 | 2.3 s | 99 tokens |
| GLM 5.3 FlashZ.ai | Passed: Returned the right 8 rows. | $0.00014 | 2.2 s | 70 tokens |
| Mistral Large 4Mistral | Passed: Returned the right 8 rows. | $0.00064 | 3.7 s | 77 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
The reply that failed first, then the ones that passed, from the cheapest up.
GLM 5.3
Failed: Returned 8 rows that don't match the expected 8 (in order).
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers c LEFT JOIN orders o ON o.customer_id = c.id AND o.status != 'Cancelled' GROUP BY c.id, c.name ORDER BY c.name; ``` The `LEFT JOIN` with the status filter in the join condition keeps customers with no valid orders (NULL date, 0 count).718 tokens in, 99 out · 2.3 s · $0.0007 · 1 message on Pro · answered by z-ai/glm-5.3 via Friendli ·
GPT-6 Luna
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(CASE WHEN o.status <> 'cancelled' THEN o.ordered_on END) AS first_order_date, COUNT(CASE WHEN o.status <> 'cancelled' THEN o.id END) AS order_count FROM customers AS c LEFT JOIN orders AS o ON o.customer_id = c.id GROUP BY c.id, c.name ORDER BY c.name; ```
694 tokens in, 92 out · 2.4 s · $0.0001 · 1 message on Pro · answered by openai/gpt-6-luna via OpenAI ·
Claude Haiku 5.5
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(CASE WHEN o.status <> 'cancelled' THEN o.ordered_on END) AS first_order_date, COUNT(CASE WHEN o.status <> 'cancelled' THEN o.id END) AS order_count FROM customers c LEFT JOIN orders o ON o.customer_id = c.id GROUP BY c.id, c.name ORDER BY c.name; ```1,116 tokens in, 156 out · 1.5 s · $0.0001 · 1 message on Pro · answered by anthropic/claude-haiku-5.5 via Anthropic ·
GLM 5.3 Flash
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers c LEFT JOIN orders o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```719 tokens in, 70 out · 2.2 s · $0.0001 · 1 message on Pro · answered by z-ai/glm-5.3-flash via Friendli ·
DeepSeek V4.1 Flash
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers c LEFT JOIN orders o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ``` The `LEFT JOIN` keeps customers with no non-cancelled orders (they get `NULL` from `MIN` and `0` from `COUNT(o.id)`, since a bare `COUNT(*)` would wrongly return 1).
739 tokens in, 292 out (169 of them reasoning) · 1.5 s · $0.0004 · 1 message on Pro · answered by deepseek/deepseek-v4.1-flash via Together ·
Gemini 3.8 Flash
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS non_cancelled_order_count FROM customers c LEFT JOIN orders o ON c.id = o.customer_id AND o.status != 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```761 tokens in, 96 out · 2.7 s · $0.0005 · 1 message on Pro · answered by google/gemini-3.8-flash via Google AI Studio ·
GPT-6.1 Terra
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers AS c LEFT JOIN orders AS o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```696 tokens in, 77 out · 1.3 s · $0.0005 · 1 message on Pro · answered by openai/gpt-6.1-terra via OpenAI ·
Mistral Large 4
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers c LEFT JOIN orders o ON o.customer_id = c.id AND LOWER(o.status) <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```720 tokens in, 191 out (114 of them reasoning) · 3.7 s · $0.0006 · 1 message on Pro · answered by mistralai/mistral-large-4-0 via Mistral ·
GPT-6 Sol
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers AS c LEFT JOIN orders AS o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```694 tokens in, 77 out · 1.7 s · $0.0011 · 1 message on Pro · answered by openai/gpt-6-sol via OpenAI ·
GPT-6.1 Sol
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers AS c LEFT JOIN orders AS o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```696 tokens in, 77 out · 13.5 s · $0.0011 · 1 message on Pro · answered by openai/gpt-6.1-sol via OpenAI ·
Claude Haiku 4.5
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers c LEFT JOIN orders o ON c.id = o.customer_id AND o.status != 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```
758 tokens in, 90 out · 1.0 s · $0.0012 · 1 message on Pro · answered by anthropic/claude-haiku-4.5 via Anthropic ·
GPT-6.2 Sol
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers AS c LEFT JOIN orders AS o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```696 tokens in, 77 out · 2.0 s · $0.0022 · 1 message on Pro · answered by openai/gpt-6.2-sol via OpenAI ·
DeepSeek V4 Pro
Passed: Returned the right 8 rows.
```sql SELECT c.name AS name, MIN(o.ordered_on) AS first_non_cancelled_order, COUNT(o.id) AS non_cancelled_order_count FROM customers c LEFT JOIN orders o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```710 tokens in, 450 out (374 of them reasoning) · 4.0 s · $0.0024 · 1 message on Pro · answered by deepseek/deepseek-v4-pro-0813 via CoreWeave ·
Kimi K3
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(CASE WHEN o.status != 'cancelled' THEN o.ordered_on END) AS first_order_date, SUM(CASE WHEN o.status != 'cancelled' THEN 1 ELSE 0 END) AS order_count FROM customers c LEFT JOIN orders o ON o.customer_id = c.id GROUP BY c.id, c.name ORDER BY c.name; ```784 tokens in, 102 out (5 of them reasoning) · 3.1 s · $0.0025 · 1 message on Pro · answered by moonshotai/kimi-k3 via Together ·
Gemini 4 Argon
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers c LEFT JOIN orders o ON c.id = o.customer_id AND o.status != 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```787 tokens in, 96 out · 16.8 s · $0.0025 · 1 message on Pro · answered by google/gemini-4-argon via Google AI Studio ·
Gemini 4 Carbon
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers AS c LEFT JOIN orders AS o ON o.customer_id = c.id AND o.status != 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```787 tokens in, 428 out (333 of them reasoning) · 8.8 s · $0.0029 · 1 message on Pro · answered by google/gemini-4-carbon via Google AI Studio ·
Kimi K3.1 Pro
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers AS c LEFT JOIN orders AS o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```787 tokens in, 175 out (89 of them reasoning) · 3.4 s · $0.0033 · 1 message on Pro · answered by moonshotai/kimi-k3.1-pro via Together ·
Gemini 4 Hydrogen
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers AS c LEFT JOIN orders AS o ON o.customer_id = c.id AND o.status != 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```787 tokens in, 772 out (677 of them reasoning) · 4.8 s · $0.0035 · 1 message on Pro · answered by google/gemini-4-hydrogen via Google AI Studio ·
Grok 4.7
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers c LEFT JOIN orders o ON o.customer_id = c.id AND o.status != 'cancelled' GROUP BY c.id ORDER BY c.name; ```
1,939 tokens in, 404 out (330 of them reasoning) · 5.3 s · $0.0036 · 1 message on Pro · answered by x-ai/grok-4.7 via xAI ·
Claude Sonnet 5.5
Passed: Returned the right 8 rows.
Assumption: cancelled orders have `status = 'cancelled'`. The status is matched case-insensitively. The join condition sits in the `ON` clause so customers with no qualifying orders are kept. ```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers c LEFT JOIN orders o ON o.customer_id = c.id AND LOWER(o.status) <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ``` `COUNT(o.id)` counts only matched orders, so customers with none get 0, and `MIN` returns NULL for them.1,117 tokens in, 243 out · 2.2 s · $0.0036 · 1 message on Pro · answered by anthropic/claude-sonnet-5.5 via Anthropic ·
Claude Sonnet 5
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(CASE WHEN o.status <> 'cancelled' THEN o.ordered_on END) AS first_order_date, COUNT(CASE WHEN o.status <> 'cancelled' THEN o.id END) AS order_count FROM customers c LEFT JOIN orders o ON o.customer_id = c.id GROUP BY c.id, c.name ORDER BY c.name; ```1,113 tokens in, 158 out · 2.4 s · $0.0043 · 1 message on Pro · answered by anthropic/claude-sonnet-5 via Anthropic ·
Gemini 3.1 Pro
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers c LEFT JOIN orders o ON c.id = o.customer_id AND o.status != 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```761 tokens in, 762 out (661 of them reasoning) · 8.0 s · $0.0053 · 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 SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers AS c LEFT JOIN orders AS o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```694 tokens in, 77 out · 4.0 s · $0.0054 · 1 message on Pro · answered by openai/gpt-6-astra via OpenAI ·
GPT-6.2 Astra
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers AS c LEFT JOIN orders AS o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ```696 tokens in, 77 out · 3.0 s · $0.0086 · 1 message on Pro · answered by openai/gpt-6.2-astra via OpenAI ·
Claude Opus 5.5
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers AS c LEFT JOIN orders AS o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ``` The status filter is in the `ON` clause rather than `WHERE`, so customers with no qualifying orders are kept. For them, `MIN` returns NULL and `COUNT(o.id)` returns 0. This assumes cancelled orders have the status `'cancelled'` and that `ordered_on` is stored in ISO format (`YYYY-MM-DD`), so `MIN` finds the earliest date.1,115 tokens in, 324 out (54 of them reasoning) · 3.8 s · $0.0089 · 1 message on Pro · answered by anthropic/claude-opus-5.5 via Azure ·
Claude Fable 5.2
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers c LEFT JOIN orders o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ``` The non-cancelled filter sits in the `ON` clause so customers without qualifying orders are kept, giving `NULL` for the date and `0` for the count. This assumes cancelled orders are marked with the status value `'cancelled'` (adjust the literal if your data uses a different spelling or case).1,115 tokens in, 227 out · 3.5 s · $0.0137 · 1 message on Pro · answered by anthropic/claude-fable-5.2 via Google ·
Claude Fable 5.1
Passed: Returned the right 8 rows.
```sql SELECT c.name, MIN(o.ordered_on) AS first_order_date, COUNT(o.id) AS order_count FROM customers c LEFT JOIN orders o ON o.customer_id = c.id AND o.status <> 'cancelled' GROUP BY c.id, c.name ORDER BY c.name; ``` The cancellation filter is in the `ON` clause rather than `WHERE`, so customers with only cancelled orders (or none) are kept with `NULL` date and `0` count.1,115 tokens in, 187 out · 2.9 s · $0.0151 · 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 “Every customer, even those without orders”?
26 of 27 models passed this SQL prompt's check (query result); GLM 5.3 didn't. The cheapest reply that passed was GPT-6 Luna's, at $0.000058; the fastest, Claude Haiku 4.5's in 1.0 s. The dearest reply, Claude Fable 5.1's, cost 262 times as much ($0.0151).
What does a reply to “Every customer, even those without orders” cost?
Through the models' APIs, what OpenRouter charged us ran from $0.000058 (GPT-6 Luna) to $0.0151 (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.