Accuracy by what the model was given
The notes do the work. Worked examples and a second try add nothing measurable on top: a difference of one question is within run-to-run noise.
The same ladder on other models
The ladder was first measured on DeepSeek, then again on gpt-5.4-mini. The jump comes from the notes on both.
| What the model was given | gpt-5.4-mini | deepseek-v4-pro |
|---|---|---|
| Table and column names only | 85% | 83% |
| + written notes about the data | 100% | 98% |
| + worked examples | 98% | 97% |
| + second attempt if the SQL fails | 100% | 98% |
Right answers by difficulty
Hard questions depend on a business rule or a trap in the data. Unanswerable questions should be refused.
| Run | Easy | Medium | Hard | Unanswerable | All |
|---|---|---|---|---|---|
| Table and column names only | 15 of 15 | 20 of 20 | 7 of 15 | 9 of 10 | 85% |
| + written notes about the data | 15 of 15 | 20 of 20 | 15 of 15 | 10 of 10 | 100% |
| + worked examples | 15 of 15 | 19 of 20 | 15 of 15 | 10 of 10 | 98% |
| + second attempt if the SQL fails | 15 of 15 | 20 of 20 | 15 of 15 | 10 of 10 | 100% |
| Everything, on deepseek-v4-flash | 15 of 15 | 17 of 20 | 15 of 15 | 10 of 10 | 95% |
| Everything, on deepseek-v4-pro | 15 of 15 | 19 of 20 | 15 of 15 | 10 of 10 | 98% |
What went wrong
Which category has the most items sold? Return the category and the number of items.medium
Why it failed: wrong filter: added a delivered-only filter the question did not ask for
Generated
SELECT t.product_category_name_english AS category, COUNT(*) AS items_sold FROM order_items i JOIN orders o ON i.order_id = o.order_id JOIN products p ON i.product_id = p.product_id JOIN product_category_name_translation t ON p.product_category_name = t.product_category_name WHERE o.order_status = 'delivered' GROUP BY t.product_category_name_english ORDER BY items_sold DESC LIMIT 1
Reference
SELECT t.product_category_name_english, count(*) AS items FROM order_items i JOIN products p ON i.product_id = p.product_id JOIN product_category_name_translation t ON p.product_category_name = t.product_category_name GROUP BY 1 ORDER BY items DESC LIMIT 1
Which 5 sellers sold the most items? Return the seller id and the number of items.medium
Why it failed: wrong filter: added a delivered-only filter the question did not ask for
Generated
SELECT i.seller_id, count(*) AS items FROM order_items i JOIN orders o ON i.order_id = o.order_id WHERE o.order_status = 'delivered' GROUP BY i.seller_id ORDER BY items DESC LIMIT 5
Reference
SELECT seller_id, count(*) AS items FROM order_items GROUP BY seller_id ORDER BY items DESC LIMIT 5
How many distinct products have been sold at least once?medium
Why it failed: wrong filter: added a delivered-only filter the question did not ask for
Generated
SELECT COUNT(DISTINCT i.product_id) FROM order_items i JOIN orders o ON i.order_id = o.order_id WHERE o.order_status = 'delivered'
Reference
SELECT count(DISTINCT product_id) FROM order_items