Skip to content

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.

Every model's reply to “Every customer, even those without orders”
ModelResultCostTimeReply
Claude Fable 5.2AnthropicPassed: Returned the right 8 rows.$0.01373.5 s227 tokens
Claude Fable 5.1AnthropicPassed: Returned the right 8 rows.$0.01512.9 s187 tokens
Claude Opus 5.5AnthropicPassed: Returned the right 8 rows.$0.00893.8 s270 tokens
Claude Sonnet 5.5AnthropicPassed: Returned the right 8 rows.$0.00362.2 s243 tokens
Claude Sonnet 5AnthropicPassed: Returned the right 8 rows.$0.00432.4 s158 tokens
Claude Haiku 5.5AnthropicPassed: Returned the right 8 rows.$0.000141.5 s156 tokens
Claude Haiku 4.5AnthropicPassed: Returned the right 8 rows.$0.00121.0 s90 tokens
GPT-6.2 AstraOpenAIPassed: Returned the right 8 rows.$0.00863.0 s77 tokens
GPT-6 AstraOpenAIPassed: Returned the right 8 rows.$0.00544.0 s77 tokens
GPT-6.2 SolOpenAIPassed: Returned the right 8 rows.$0.00222.0 s77 tokens
GPT-6.1 SolOpenAIPassed: Returned the right 8 rows.$0.001113.5 s77 tokens
GPT-6 SolOpenAIPassed: Returned the right 8 rows.$0.00111.7 s77 tokens
GPT-6.1 TerraOpenAIPassed: Returned the right 8 rows.$0.000541.3 s77 tokens
GPT-6 LunaOpenAIPassed: Returned the right 8 rows.$0.0000582.4 s92 tokens
Gemini 4 CarbonGooglePassed: Returned the right 8 rows.$0.00298.8 s95 tokens
Gemini 4 ArgonGooglePassed: Returned the right 8 rows.$0.002516.8 s96 tokens
Gemini 4 HydrogenGooglePassed: Returned the right 8 rows.$0.00354.8 s95 tokens
Gemini 3.1 Pro (preview)GooglePassed: Returned the right 8 rows.$0.00538.0 s101 tokens
Gemini 3.8 FlashGooglePassed: Returned the right 8 rows.$0.000472.7 s96 tokens
DeepSeek V4.1 FlashDeepSeekPassed: Returned the right 8 rows.$0.000421.5 s123 tokens
DeepSeek V4 ProDeepSeekPassed: Returned the right 8 rows.$0.00244.0 s76 tokens
Grok 4.7xAIPassed: Returned the right 8 rows.$0.00365.3 s74 tokens
Kimi K3.1 ProMoonshotPassed: Returned the right 8 rows.$0.00333.4 s86 tokens
Kimi K3MoonshotPassed: Returned the right 8 rows.$0.00253.1 s97 tokens
GLM 5.3Z.aiFailed: Returned 8 rows that don't match the expected 8 (in order).$0.000712.3 s99 tokens
GLM 5.3 FlashZ.aiPassed: Returned the right 8 rows.$0.000142.2 s70 tokens
Mistral Large 4MistralPassed: Returned the right 8 rows.$0.000643.7 s77 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.

  1. 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 ·

  2. 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 ·

  3. 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 ·

  4. 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 ·

  5. 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 ·

  6. 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 ·

  7. 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 ·

  8. 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 ·

  9. 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 ·

  10. 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 ·

  11. 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 ·

  12. 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 ·

  13. 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 ·

  14. 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 ·

  15. 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 ·

  16. 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 ·

  17. 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 ·

  18. 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 ·

  19. 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 ·

  20. 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 ·

  21. 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 ·

  22. 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 ·

  23. 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 ·

  24. 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 ·

  25. 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 ·

  26. 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 ·

  27. 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.