Gemini 3.1 Pro Preview vs Gemini 3.8 Flash vs Gemini 3.5 Flash Lite on top five customers by 2025 spend
Google models side by side on "Top five customers by 2025 spend": Gemini 3.5 Flash Lite scores 10/10; Gemini 3.5 Flash Lite is the cheapest answer scoring 8+ at $0.20 per 1,000 runs. Outputs, checks, judge reasons, latency and cost.
The prompt every model received
System
You are a database engineer. Reply with a single SQL statement and nothing else.
User
Tables: customers(id, name) and orders(id, customer_id, amount, ordered_at). Write one standard SQL query that returns each customer's name and their total order amount for calendar year 2025, highest total first, limited to the top 5. Use a JOIN, GROUP BY and ORDER BY.
Rubric for the judge: Correct join and aggregate, filters ordered_at to 2025, sorts descending, limits to 5, portable SQL.
Side by side
Every cell is one OpenRouter call at temperature 0 with the prompt's token cap and reasoning effort "low" where the model supports it. Cost is usage × the catalogue rate in models.json. Quality is one judge call to anthropic/claude-haiku-4.5 against the prompt's rubric, cached per prompt version.
Gemini 3.1 Pro Preview
google/gemini-3.1-pro-preview
1/10
Latency
2.4s
Cost
$0.00612
Per 1,000
$6.12
86 in · 496 out (477 reasoning) · 7 words · checks 1/6
✕regex
✕regex
✕regex
✕regex
✓regex
✕contains
SELECT customers.name, SUM(orders.amount) AS total_amount
FROM customers
Judge: Output is incomplete and non-functional: missing JOIN clause, WHERE filter for 2025, GROUP BY, ORDER BY, and LIMIT statements required by the task.
Gemini 3.8 Flash
google/gemini-3.8-flash
10/10
Latency
1.3s
Cost
$0.00042
Per 1,000
$0.42
86 in · 94 out · 33 words · checks 6/6
✓regex
✓regex
✓regex
✓regex
✓regex
✓contains
SELECT c.name, SUM(o.amount) AS total_amount
FROM customers c
JOIN orders o ON c.id = o.customer_id
WHERE o.ordered_at >= '2025-01-01' AND o.ordered_at < '2026-01-01'
GROUP BY c.id, c.name
ORDER BY total_amount DESC
LIMIT 5;
Judge: Query correctly joins customers and orders, filters 2025 using date range, groups by customer with proper aggregation, orders descending by total, limits to 5, and uses portable standard SQL syntax.
Gemini 3.5 Flash Lite
google/gemini-3.5-flash-lite
10/10
top judge scorecheapest scoring 8+
Latency
514ms
Cost
$0.00020
Per 1,000
$0.20
86 in · 68 out · 31 words · checks 6/6
✓regex
✓regex
✓regex
✓regex
✓regex
✓contains
SELECT c.name, SUM(o.amount) AS total_amount FROM customers c JOIN orders o ON c.id = o.customer_id WHERE EXTRACT(YEAR FROM o.ordered_at) = 2025 GROUP BY c.id, c.name ORDER BY total_amount DESC LIMIT 5;
Judge: Query correctly joins customers and orders, filters 2025 using EXTRACT(YEAR FROM ...), groups by customer with proper aggregation, orders descending by total, limits to 5, and uses portable standard SQL syntax.
Frequently asked
▸What does this prompt test?
SQL: Correct join and aggregate, filters ordered_at to 2025, sorts descending, limits to 5, portable SQL. The deterministic checks are regex, regex, regex, regex, regex, contains.
▸Which model should I pick for this task?
If the judge's bar of 8/10 is good enough for you, Gemini 3.5 Flash Lite at $0.20 per 1,000 runs. If you need the top score, Gemini 3.5 Flash Lite at $0.20 per 1,000 runs.
If our calculators helped you cut down on hidden AI wallet leaks, thanks for using them. A tiny fraction of your savings is what keeps our pricing indexes updated daily.
Not sure which AI is cheapest for your use case? Find out in 30 seconds — no signup required.