Skip to content

Tested prompt · SQL

Revenue by category: every AI model's reply, tested

We sent this everyday 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.000054; the fastest, DeepSeek V4.1 Flash's in 0.5 s. The dearest reply, Claude Fable 5.1's, cost 277 times as much ($0.0149).

The prompt, as sent, and its check

Checked by query result, the same way for every model.

Revenue by category (everyday)

[5 lines every SQL prompt of ours shares, word for word: the whole prompt, on the methods page]
For completed orders only, show each product category and its revenue in dollars (quantity times price), highest revenue first.
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 p.category, 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 = 'completed'
GROUP BY p.category
ORDER BY revenue DESC

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 “Revenue by category”
ModelResultCostTimeReply
Claude Fable 5.2AnthropicPassed: Returned the right 3 rows.$0.01162.9 s184 tokens
Claude Fable 5.1AnthropicPassed: Returned the right 3 rows.$0.01493.7 s192 tokens
Claude Opus 5.5AnthropicPassed: Returned the right 3 rows.$0.00612.1 s151 tokens
Claude Sonnet 5.5AnthropicPassed: Returned the right 3 rows.$0.00274.1 s161 tokens
Claude Sonnet 5AnthropicPassed: Returned the right 3 rows.$0.00362.3 s141 tokens
Claude Haiku 5.5AnthropicPassed: Returned the right 3 rows.$0.000131.0 s141 tokens
Claude Haiku 4.5AnthropicPassed: Returned the right 3 rows.$0.00121.1 s103 tokens
GPT-6.2 AstraOpenAIPassed: Returned the right 3 rows.$0.00863.0 s82 tokens
GPT-6 AstraOpenAIPassed: Returned the right 3 rows.$0.00544.9 s84 tokens
GPT-6.2 SolOpenAIPassed: Returned the right 3 rows.$0.00221.9 s84 tokens
GPT-6.1 SolOpenAIPassed: Returned the right 3 rows.$0.00222.4 s84 tokens
GPT-6 SolOpenAIPassed: Returned the right 3 rows.$0.00112.5 s90 tokens
GPT-6.1 TerraOpenAIPassed: Returned the right 3 rows.$0.000542.0 s84 tokens
GPT-6 LunaOpenAIPassed: Returned the right 3 rows.$0.0000542.6 s82 tokens
Gemini 4 CarbonGooglePassed: Returned the right 3 rows.$0.004516.0 s98 tokens
Gemini 4 ArgonGooglePassed: Returned the right 3 rows.$0.00137.0 s117 tokens
Gemini 4 HydrogenGooglePassed: Returned the right 3 rows.$0.00304.1 s98 tokens
Gemini 3.1 Pro (preview)GooglePassed: Returned the right 3 rows.$0.00334.8 s92 tokens
Gemini 3.8 FlashGooglePassed: Returned the right 3 rows.$0.000461.8 s101 tokens
DeepSeek V4.1 FlashDeepSeekPassed: Returned the right 3 rows.$0.000170.5 s85 tokens
DeepSeek V4 ProDeepSeekPassed: Returned the right 3 rows.$0.00182.5 s80 tokens
Grok 4.7xAIPassed: Returned the right 3 rows.$0.00313.7 s86 tokens
Kimi K3.1 ProMoonshotPassed: Returned the right 3 rows.$0.00353.7 s104 tokens
Kimi K3MoonshotPassed: Returned the right 3 rows.$0.00233.2 s92 tokens
GLM 5.3Z.aiPassed: Returned the right 3 rows.$0.000590.6 s79 tokens
GLM 5.3 FlashZ.aiPassed: Returned the right 3 rows.$0.000140.6 s80 tokens
Mistral Large 4MistralPassed: Returned the right 3 rows.$0.000473.4 s80 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.

  1. GPT-6 Luna

    Passed: Returned the right 3 rows.

    ```sql
    SELECT p.category,
           SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    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 = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    665 tokens in, 82 out · 2.6 s · $0.0001 · 1 message on Pro · answered by openai/gpt-6-luna via OpenAI ·

  2. Claude Haiku 5.5

    Passed: Returned the right 3 rows.

    ```sql
    SELECT p.category,
           SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    FROM order_items oi
    JOIN orders o ON o.id = oi.order_id
    JOIN products p ON p.id = oi.product_id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    1,077 tokens in, 141 out · 1.0 s · $0.0001 · 1 message on Pro · answered by anthropic/claude-haiku-5.5 via Anthropic ·

  3. GLM 5.3 Flash

    Passed: Returned the right 3 rows.

    ```sql
    SELECT p.category,
           SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    FROM order_items oi
    JOIN orders o   ON o.id = oi.order_id
    JOIN products p ON p.id = oi.product_id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    688 tokens in, 80 out · 0.6 s · $0.0001 · 1 message on Pro · answered by z-ai/glm-5.3-flash via Friendli ·

  4. DeepSeek V4.1 Flash

    Passed: Returned the right 3 rows.

    ```sql
    SELECT p.category,
           SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    FROM order_items oi
    JOIN orders o ON o.id = oi.order_id
    JOIN products p ON p.id = oi.product_id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    708 tokens in, 88 out (3 of them reasoning) · 0.5 s · $0.0002 · 1 message on Pro · answered by deepseek/deepseek-v4.1-flash via Together ·

  5. Gemini 3.8 Flash

    Passed: Returned the right 3 rows.

    ```sql
    SELECT 
        p.category,
        ROUND(SUM(oi.quantity * p.price_cents) / 100.0, 2) AS revenue_dollars
    FROM order_items oi
    JOIN orders o ON oi.order_id = o.id
    JOIN products p ON oi.product_id = p.id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    728 tokens in, 101 out · 1.8 s · $0.0005 · 1 message on Pro · answered by google/gemini-3.8-flash via Google AI Studio ·

  6. Mistral Large 4

    Passed: Returned the right 3 rows.

    ```sql
    SELECT p.category,
           SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    FROM order_items oi
    JOIN orders o ON o.id = oi.order_id
    JOIN products p ON p.id = oi.product_id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    689 tokens in, 126 out (46 of them reasoning) · 3.4 s · $0.0005 · 1 message on Pro · answered by mistralai/mistral-large-4-0 via Mistral ·

  7. GPT-6.1 Terra

    Passed: Returned the right 3 rows.

    ```sql
    SELECT
        p.category,
        SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    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 = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    667 tokens in, 84 out · 2.0 s · $0.0005 · 1 message on Pro · answered by openai/gpt-6.1-terra via OpenAI ·

  8. GLM 5.3

    Passed: Returned the right 3 rows.

    ```sql
    SELECT p.category,
           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 = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    687 tokens in, 79 out · 0.6 s · $0.0006 · 1 message on Pro · answered by z-ai/glm-5.3 via Friendli ·

  9. GPT-6 Sol

    Passed: Returned the right 3 rows.

    ```sql
    SELECT
        p.category,
        ROUND(SUM(oi.quantity * p.price_cents) / 100.0, 2) AS revenue_dollars
    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 = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    665 tokens in, 90 out · 2.5 s · $0.0011 · 1 message on Pro · answered by openai/gpt-6-sol via OpenAI ·

  10. Claude Haiku 4.5

    Passed: Returned the right 3 rows.

    ```sql
    SELECT 
      p.category,
      SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    FROM order_items oi
    JOIN products p ON oi.product_id = p.id
    JOIN orders o ON oi.order_id = o.id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    726 tokens in, 103 out · 1.1 s · $0.0012 · 1 message on Pro · answered by anthropic/claude-haiku-4.5 via Anthropic ·

  11. Gemini 4 Argon

    Passed: Returned the right 3 rows.

    ```sql
    SELECT 
        p.category,
        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.status = 'completed'
    GROUP BY 
        p.category
    ORDER BY 
        revenue_dollars DESC;
    ```

    754 tokens in, 117 out · 7.0 s · $0.0013 · 1 message on Pro · answered by google/gemini-4-argon via Google AI Studio ·

  12. DeepSeek V4 Pro

    Passed: Returned the right 3 rows.

    ```sql
    SELECT p.category,
           SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    FROM order_items oi
    JOIN orders o ON o.id = oi.order_id
    JOIN products p ON p.id = oi.product_id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    679 tokens in, 319 out (239 of them reasoning) · 2.5 s · $0.0018 · 1 message on Pro · answered by deepseek/deepseek-v4-pro-0813 via CoreWeave ·

  13. GPT-6.2 Sol

    Passed: Returned the right 3 rows.

    ```sql
    SELECT
        p.category,
        SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    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 = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    667 tokens in, 84 out · 1.9 s · $0.0022 · 1 message on Pro · answered by openai/gpt-6.2-sol via OpenAI ·

  14. GPT-6.1 Sol

    Passed: Returned the right 3 rows.

    ```sql
    SELECT
        p.category,
        SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    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 = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    667 tokens in, 84 out · 2.4 s · $0.0022 · 1 message on Pro · answered by openai/gpt-6.1-sol via OpenAI ·

  15. Kimi K3

    Passed: Returned the right 3 rows.

    ```sql
    SELECT p.category,
           SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    FROM order_items oi
    JOIN orders o ON o.id = oi.order_id
    JOIN products p ON p.id = oi.product_id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    755 tokens in, 95 out (3 of them reasoning) · 3.2 s · $0.0023 · 1 message on Pro · answered by moonshotai/kimi-k3 via Together ·

  16. Claude Sonnet 5.5

    Passed: Returned the right 3 rows.

    Assuming completed orders have `status = 'completed'`:
    
    ```sql
    SELECT p.category,
           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 = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    1,078 tokens in, 161 out · 4.1 s · $0.0027 · 1 message on Pro · answered by anthropic/claude-sonnet-5.5 via Anthropic ·

  17. Gemini 4 Hydrogen

    Passed: Returned the right 3 rows.

    ```sql
    SELECT
        p.category,
        SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    FROM order_items oi
    JOIN orders o ON oi.order_id = o.id
    JOIN products p ON oi.product_id = p.id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    754 tokens in, 649 out (551 of them reasoning) · 4.1 s · $0.0030 · 1 message on Pro · answered by google/gemini-4-hydrogen via Google AI Studio ·

  18. Grok 4.7

    Passed: Returned the right 3 rows.

    ```sql
    SELECT
      p.category,
      SUM(oi.quantity * p.price_cents) / 100.0 AS revenue
    FROM order_items AS oi
    JOIN orders AS o ON o.id = oi.order_id
    JOIN products AS p ON p.id = oi.product_id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue DESC;
    ```

    1,910 tokens in, 326 out (240 of them reasoning) · 3.7 s · $0.0031 · 1 message on Pro · answered by x-ai/grok-4.7 via xAI ·

  19. Gemini 3.1 Pro

    Passed: Returned the right 3 rows.

    ```sql
    SELECT 
        p.category, 
        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.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue DESC;
    ```

    728 tokens in, 429 out (337 of them reasoning) · 4.8 s · $0.0033 · 1 message on Pro · answered by google/gemini-3.1-pro-preview via Google AI Studio ·

  20. Kimi K3.1 Pro

    Passed: Returned the right 3 rows.

    ```sql
    SELECT
        p.category,
        ROUND(SUM(oi.quantity * p.price_cents) / 100.0, 2) AS revenue_dollars
    FROM order_items AS oi
    JOIN orders AS o ON o.id = oi.order_id
    JOIN products AS p ON p.id = oi.product_id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    758 tokens in, 197 out (93 of them reasoning) · 3.7 s · $0.0035 · 1 message on Pro · answered by moonshotai/kimi-k3.1-pro via Together ·

  21. Claude Sonnet 5

    Passed: Returned the right 3 rows.

    ```sql
    SELECT p.category,
           SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    FROM order_items oi
    JOIN products p ON p.id = oi.product_id
    JOIN orders o ON o.id = oi.order_id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    1,074 tokens in, 141 out · 2.3 s · $0.0036 · 1 message on Pro · answered by anthropic/claude-sonnet-5 via Anthropic ·

  22. Gemini 4 Carbon

    Passed: Returned the right 3 rows.

    ```sql
    SELECT
        p.category,
        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.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    754 tokens in, 741 out (643 of them reasoning) · 16.0 s · $0.0045 · 1 message on Pro · answered by google/gemini-4-carbon via Google AI Studio ·

  23. GPT-6 Astra

    Passed: Returned the right 3 rows.

    ```sql
    SELECT
        p.category,
        SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    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 = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    665 tokens in, 84 out · 4.9 s · $0.0054 · 1 message on Pro · answered by openai/gpt-6-astra via OpenAI ·

  24. Claude Opus 5.5

    Passed: Returned the right 3 rows.

    ```sql
    SELECT
      p.category,
      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 = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    1,076 tokens in, 197 out (46 of them reasoning) · 2.1 s · $0.0061 · 1 message on Pro · answered by anthropic/claude-opus-5.5 via Azure ·

  25. GPT-6.2 Astra

    Passed: Returned the right 3 rows.

    ```sql
    SELECT p.category,
           SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    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 = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```

    667 tokens in, 82 out · 3.0 s · $0.0086 · 1 message on Pro · answered by openai/gpt-6.2-astra via OpenAI ·

  26. Claude Fable 5.2

    Passed: Returned the right 3 rows.

    ```sql
    SELECT
        p.category,
        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 = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```
    
    This assumes completed orders are stored with the status value `'completed'` (adjust the literal if your data uses different casing or wording).

    1,076 tokens in, 184 out · 2.9 s · $0.0116 · 1 message on Pro · answered by anthropic/claude-fable-5.2 via Google ·

  27. Claude Fable 5.1

    Passed: Returned the right 3 rows.

    ```sql
    SELECT p.category,
           SUM(oi.quantity * p.price_cents) / 100.0 AS revenue_dollars
    FROM order_items oi
    JOIN orders o   ON o.id = oi.order_id
    JOIN products p ON p.id = oi.product_id
    WHERE o.status = 'completed'
    GROUP BY p.category
    ORDER BY revenue_dollars DESC;
    ```
    
    This assumes completed orders have `status = 'completed'`; adjust the literal if your data uses a different value (e.g. `'COMPLETED'`).

    1,076 tokens in, 192 out · 3.7 s · $0.0149 · 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 “Revenue by category”?

All 27 models passed this SQL prompt's check (query result). The cheapest reply that passed was GPT-6 Luna's, at $0.000054; the fastest, DeepSeek V4.1 Flash's in 0.5 s. The dearest reply, Claude Fable 5.1's, cost 277 times as much ($0.0149).

What does a reply to “Revenue by category” cost?

Through the models' APIs, what OpenRouter charged us ran from $0.000054 (GPT-6 Luna) to $0.0149 (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.