LogicPalette commited on
Commit
09c008d
·
verified ·
1 Parent(s): f741e18

data update

Browse files
audit/dbs.tar.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:048d734b24079c0d9e396af2d2cf8f26c938a8f6852e7e7e84f5fc6ad62dd7c9
3
  size 23599633
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4041002dd5fc1e17c6714d97647b1e38abac78d1c53fdf47c02c6768ce858cb6
3
  size 23599633
results/e5_l4_check.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "what": "GRPO-B test generation re-run on the L4 VM (scripts/vm_time_l4.sh), for E5 throughput; same settings as results/traj_B.jsonl",
3
+ "gpu": "NVIDIA L4",
4
+ "gen_s": 785.27,
5
+ "trajectories": 2648,
6
+ "verified": [
7
+ 0.12462235649546828,
8
+ 0.11258315660249904,
9
+ 0.1377491407715221
10
+ ],
11
+ "single": [
12
+ 0.17069486404833836,
13
+ 0.15684374949962526,
14
+ 0.18550007676812763
15
+ ]
16
+ }
results/e5_roi.json CHANGED
@@ -31,9 +31,11 @@
31
  0.13248019213082912,
32
  0.15933271253134978
33
  ],
34
- "gen_s": 465.57,
35
- "trajectories_per_s": 5.687651695770776,
36
- "usd_per_1k": 0.03614067220543806
 
 
37
  },
38
  "B": {
39
  "n": 2648,
@@ -47,9 +49,11 @@
47
  0.16413956667413937,
48
  0.19328811678930724
49
  ],
50
- "gen_s": 523.65,
51
- "trajectories_per_s": 5.056812756612241,
52
- "usd_per_1k": 0.04064923212487412
 
 
53
  },
54
  "C": {
55
  "n": 2648,
@@ -63,9 +67,11 @@
63
  0.12776814975928472,
64
  0.15424024772569325
65
  ],
66
- "gen_s": 443.21,
67
- "trajectories_per_s": 5.974594436046118,
68
- "usd_per_1k": 0.034404938737831486
 
 
69
  },
70
  "assumptions": {
71
  "command_a_usd_per_1M": [
@@ -73,6 +79,7 @@
73
  10.0
74
  ],
75
  "gpu_usd_hr": 0.74,
76
- "throughput_gpu": "RTX 5070 Ti laptop, vLLM batched; latency per query not measured for Tiny Aya"
 
77
  }
78
  }
 
31
  0.13248019213082912,
32
  0.15933271253134978
33
  ],
34
+ "gen_s_laptop": 465.57,
35
+ "gen_s_l4": 698.1727373245488,
36
+ "l4_time": "laptop time x B's L4/laptop ratio",
37
+ "trajectories_per_s": 3.7927576635938807,
38
+ "usd_per_1k": 0.05419685985441488
39
  },
40
  "B": {
41
  "n": 2648,
 
49
  0.16413956667413937,
50
  0.19328811678930724
51
  ],
52
+ "gen_s_laptop": 523.65,
53
+ "gen_s_l4": 785.27,
54
+ "l4_time": "measured on L4",
55
+ "trajectories_per_s": 3.3720885809976187,
56
+ "usd_per_1k": 0.06095793470963409
57
  },
58
  "C": {
59
  "n": 2648,
 
67
  0.12776814975928472,
68
  0.15424024772569325
69
  ],
70
+ "gen_s_laptop": 443.21,
71
+ "gen_s_l4": 664.6414908813138,
72
+ "l4_time": "laptop time x B's L4/laptop ratio",
73
+ "trajectories_per_s": 3.984102762661951,
74
+ "usd_per_1k": 0.05159393916290829
75
  },
76
  "assumptions": {
77
  "command_a_usd_per_1M": [
 
79
  10.0
80
  ],
81
  "gpu_usd_hr": 0.74,
82
+ "l4_over_laptop_ratio": 1.4996085171393105,
83
+ "throughput": "vLLM batched, 331 items x 8 samples, T=0.7; B timed on the L4 (785 s) and on an RTX 5070 Ti laptop; per-query latency not measured for Tiny Aya"
84
  }
85
  }
results/manual_audit.jsonl ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"n": 0, "model": "sft_ho", "id": "F1_category_buyers|toys|2024|S_s501", "sample": 3, "lucky": true, "family": "F1", "template": "F1_category_buyers", "label": "extra_filter", "nl2sql_bugs": "Condition-related", "what": "extra status filter the question does not ask for", "note": "", "question": "How many distinct customers bought a toys product in 2024? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'toys' AND substr(o.order_date, 1, 4) = '2024'", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'toys' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2024'"}
2
+ {"n": 1, "model": "sft_ho", "id": "F2_units_paid|grocery|2025|S_s501", "sample": 3, "lucky": true, "family": "F2", "template": "F2_units_paid", "label": "wrong_date_col", "nl2sql_bugs": "Attribute-related", "what": "order_date used where the question says payment date", "note": "also an extra status filter", "question": "How many units of grocery products were in orders that received a payment in 2025 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'grocery' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2025')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'grocery' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2025'"}
3
+ {"n": 2, "model": "sft_ho", "id": "F4_current_tier_list|Mumbai|gold|S_s502", "sample": 3, "lucky": true, "family": "F4", "template": "F4_current_tier_list", "label": "missing_current", "nl2sql_bugs": "Condition-related", "what": "no latest-row (current tier) filter on tier_history", "note": "", "question": "List the IDs of customers from Mumbai whose current tier is gold.", "gold_sql": "SELECT t.customer_id FROM tier_history t JOIN customers c ON c.customer_id = t.customer_id WHERE c.city = 'Mumbai' AND t.tier = 'gold' AND t.valid_from = (SELECT MAX(t2.valid_from) FROM tier_history t2 WHERE t2.customer_id = t.customer_id)", "sql": "SELECT c.customer_id FROM customers c WHERE c.city = 'Mumbai' AND EXISTS (SELECT 1 FROM tier_history th WHERE th.customer_id = c.customer_id AND th.tier = 'gold')"}
4
+ {"n": 3, "model": "sft_ho", "id": "F1_category_buyers|electronics|2024|S_s502", "sample": 2, "lucky": true, "family": "F1", "template": "F1_category_buyers", "label": "extra_filter", "nl2sql_bugs": "Condition-related", "what": "extra status filter the question does not ask for", "note": "", "question": "How many distinct customers bought a electronics product in 2024? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'electronics' AND substr(o.order_date, 1, 4) = '2024'", "sql": "SELECT COUNT(*) FROM (SELECT DISTINCT o.customer_id FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id JOIN customers c ON c.customer_id = o.customer_id WHERE p.category = 'electronics' AND o.status IN ('placed', 'shipped') AND o.order_date LIKE '2024-%')"}
5
+ {"n": 4, "model": "sft_ho", "id": "F2_units_paid|electronics|2024|S_s503", "sample": 5, "lucky": true, "family": "F2", "template": "F2_units_paid", "label": "count_for_sum", "nl2sql_bugs": "Function-related", "what": "COUNT(*) instead of SUM(quantity)", "note": "also order_date for payment date", "question": "How many units of electronics products were in orders that received a payment in 2024 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'electronics' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2024')", "sql": "SELECT COUNT(*) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'electronics' AND substr(o.order_date, 1, 4) = '2024'"}
6
+ {"n": 5, "model": "sft_ho", "id": "F4_net_invoice|Indore|2024|S_s503", "sample": 2, "lucky": true, "family": "F4", "template": "F4_net_invoice", "label": "missing_table", "nl2sql_bugs": "Table-related", "what": "invoice_adjustments left out of net invoice", "note": "also includes cancelled orders", "question": "What is the total net invoice amount of shipped orders placed in 2024 by customers from Indore?", "gold_sql": "SELECT (SELECT SUM(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Indore' AND o.status = 'shipped' AND substr(o.order_date, 1, 4) = '2024') + (SELECT COALESCE(SUM(a.amount), 0) FROM invoice_adjustments a JOIN orders o ON o.order_id = a.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Indore' AND o.status = 'shipped' AND substr(o.order_date, 1, 4) = '2024')", "sql": "SELECT SUM(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Indore' AND o.status IN ('shipped', 'cancelled') AND substr(o.order_date, 1, 4) = '2024'"}
7
+ {"n": 6, "model": "sft_ho", "id": "F1_category_buyers|books|2024|S_s501", "sample": 7, "lucky": false, "family": "F1", "template": "F1_category_buyers", "label": "value_linking", "nl2sql_bugs": "Value-related", "what": "product category matched against customer columns, or hallucinated value", "note": "", "question": "How many distinct customers bought a books product in 2024? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'books' AND substr(o.order_date, 1, 4) = '2024'", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM orders o JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'books' AND substr(o.order_date, 1, 4) = '2024'"}
8
+ {"n": 7, "model": "sft_ho", "id": "F2_units_paid|toys|2025|S_s501", "sample": 3, "lucky": false, "family": "F2", "template": "F2_units_paid", "label": "wrong_date_col", "nl2sql_bugs": "Attribute-related", "what": "order_date used where the question says payment date", "note": "", "question": "How many units of toys products were in orders that received a payment in 2025 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'toys' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2025')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'toys' AND substr(o.order_date, 1, 4) = '2025'"}
9
+ {"n": 8, "model": "sft_ho", "id": "F3_avg_order|Mumbai|2024|S_s503", "sample": 1, "lucky": false, "family": "F3", "template": "F3_avg_order", "label": "wrong_grain", "nl2sql_bugs": "Clause-related", "what": "AVG over order items instead of per-order totals", "note": "", "question": "What is the average gross value of active orders placed in 2024 by customers in Mumbai? An order's gross value is the sum of quantity \u00d7 unit price over its items.", "gold_sql": "SELECT AVG(t.v) FROM (SELECT o.order_id, SUM(oi.quantity * oi.unit_price) AS v FROM orders o JOIN order_items oi ON oi.order_id = o.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Mumbai' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2024' GROUP BY o.order_id) t", "sql": "SELECT AVG(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Mumbai' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2024'"}
10
+ {"n": 9, "model": "sft_ho", "id": "F4_current_tier_list|Kochi|bronze|S_s502", "sample": 5, "lucky": false, "family": "F4", "template": "F4_current_tier_list", "label": "incoherent", "nl2sql_bugs": "Others", "what": "incoherent query or exploratory query given as the answer", "note": "self-join on name, nonexistent customers.tier", "question": "List the IDs of customers from Kochi whose current tier is bronze.", "gold_sql": "SELECT t.customer_id FROM tier_history t JOIN customers c ON c.customer_id = t.customer_id WHERE c.city = 'Kochi' AND t.tier = 'bronze' AND t.valid_from = (SELECT MAX(t2.valid_from) FROM tier_history t2 WHERE t2.customer_id = t.customer_id)", "sql": "SELECT c.customer_id FROM customers c WHERE c.city = 'Kochi' AND c.name IN (SELECT c2.name FROM customers c2 WHERE c2.tier = 'bronze' AND c2.customer_id != c.customer_id)"}
11
+ {"n": 10, "model": "sft_ho", "id": "F1_category_buyers|home|2024|S_s503", "sample": 5, "lucky": false, "family": "F1", "template": "F1_category_buyers", "label": "value_linking", "nl2sql_bugs": "Value-related", "what": "product category matched against customer columns, or hallucinated value", "note": "invented city 'Malibu'", "question": "How many distinct customers bought a home product in 2024? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'home' AND substr(o.order_date, 1, 4) = '2024'", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM orders o JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Malibu' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2024'"}
12
+ {"n": 11, "model": "sft_ho", "id": "F2_units_paid|home|2024|S_s501", "sample": 0, "lucky": false, "family": "F2", "template": "F2_units_paid", "label": "wrong_date_col", "nl2sql_bugs": "Attribute-related", "what": "order_date used where the question says payment date", "note": "", "question": "How many units of home products were in orders that received a payment in 2024 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'home' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2024')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'home' AND substr(o.order_date, 1, 4) = '2024'"}
13
+ {"n": 12, "model": "sft_ho", "id": "F3_avg_order|Surat|2024|S_s501", "sample": 0, "lucky": false, "family": "F3", "template": "F3_avg_order", "label": "incoherent", "nl2sql_bugs": "Others", "what": "incoherent query or exploratory query given as the answer", "note": "returned SELECT status, COUNT(*) as the answer", "question": "What is the average gross value of active orders placed in 2024 by customers in Surat? An order's gross value is the sum of quantity \u00d7 unit price over its items.", "gold_sql": "SELECT AVG(t.v) FROM (SELECT o.order_id, SUM(oi.quantity * oi.unit_price) AS v FROM orders o JOIN order_items oi ON oi.order_id = o.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Surat' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2024' GROUP BY o.order_id) t", "sql": "SELECT status, COUNT(*) FROM orders GROUP BY status"}
14
+ {"n": 13, "model": "sft_ho", "id": "F4_net_invoice|Surat|2025|S_s502", "sample": 1, "lucky": false, "family": "F4", "template": "F4_net_invoice", "label": "missing_table", "nl2sql_bugs": "Table-related", "what": "invoice_adjustments left out of net invoice", "note": "", "question": "What is the total net invoice amount of shipped orders placed in 2025 by customers from Surat?", "gold_sql": "SELECT (SELECT SUM(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Surat' AND o.status = 'shipped' AND substr(o.order_date, 1, 4) = '2025') + (SELECT COALESCE(SUM(a.amount), 0) FROM invoice_adjustments a JOIN orders o ON o.order_id = a.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Surat' AND o.status = 'shipped' AND substr(o.order_date, 1, 4) = '2025')", "sql": "SELECT SUM(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Surat' AND o.status = 'shipped' AND substr(o.order_date, 1, 4) = '2025'"}
15
+ {"n": 14, "model": "sft_ho", "id": "F1_category_buyers|books|2024|S_s502", "sample": 7, "lucky": false, "family": "F1", "template": "F1_category_buyers", "label": "value_linking", "nl2sql_bugs": "Value-related", "what": "product category matched against customer columns, or hallucinated value", "note": "nonexistent customers.category", "question": "How many distinct customers bought a books product in 2024? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'books' AND substr(o.order_date, 1, 4) = '2024'", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM orders o JOIN customers c ON c.customer_id = o.customer_id WHERE c.category = 'books' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2024'"}
16
+ {"n": 15, "model": "sft_ho", "id": "F2_units_paid|toys|2024|S_s502", "sample": 0, "lucky": false, "family": "F2", "template": "F2_units_paid", "label": "wrong_date_col", "nl2sql_bugs": "Attribute-related", "what": "order_date used where the question says payment date", "note": "", "question": "How many units of toys products were in orders that received a payment in 2024 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'toys' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2024')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'toys' AND substr(o.order_date, 1, 4) = '2024'"}
17
+ {"n": 16, "model": "B", "id": "F1_category_buyers|grocery|2024|S_s502", "sample": 2, "lucky": true, "family": "F1", "template": "F1_category_buyers", "label": "extra_filter", "nl2sql_bugs": "Condition-related", "what": "extra status filter the question does not ask for", "note": "", "question": "How many distinct customers bought a grocery product in 2024? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'grocery' AND substr(o.order_date, 1, 4) = '2024'", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'grocery' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2024'"}
18
+ {"n": 17, "model": "B", "id": "F2_units_paid|books|2024|S_s503", "sample": 0, "lucky": true, "family": "F2", "template": "F2_units_paid", "label": "wrong_date_col", "nl2sql_bugs": "Attribute-related", "what": "order_date used where the question says payment date", "note": "payments of any date", "question": "How many units of books products were in orders that received a payment in 2024 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'books' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2024')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'books' AND o.order_id IN (SELECT order_id FROM payments) AND substr(o.order_date, 1, 4) = '2024'"}
19
+ {"n": 18, "model": "B", "id": "F4_net_invoice|Pune|2024|S_s501", "sample": 6, "lucky": true, "family": "F4", "template": "F4_net_invoice", "label": "missing_table", "nl2sql_bugs": "Table-related", "what": "invoice_adjustments left out of net invoice", "note": "", "question": "What is the total net invoice amount of shipped orders placed in 2024 by customers from Pune?", "gold_sql": "SELECT (SELECT SUM(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Pune' AND o.status = 'shipped' AND substr(o.order_date, 1, 4) = '2024') + (SELECT COALESCE(SUM(a.amount), 0) FROM invoice_adjustments a JOIN orders o ON o.order_id = a.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Pune' AND o.status = 'shipped' AND substr(o.order_date, 1, 4) = '2024')", "sql": "SELECT SUM(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Pune' AND o.status = 'shipped' AND substr(o.order_date, 1, 4) = '2024'"}
20
+ {"n": 19, "model": "B", "id": "F2_units_paid|toys|2025|S_s502", "sample": 6, "lucky": true, "family": "F2", "template": "F2_units_paid", "label": "wrong_date_col", "nl2sql_bugs": "Attribute-related", "what": "order_date used where the question says payment date", "note": "payments of any date", "question": "How many units of toys products were in orders that received a payment in 2025 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'toys' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2025')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'toys' AND substr(o.order_date, 1, 4) = '2025' AND o.order_id IN (SELECT order_id FROM payments)"}
21
+ {"n": 20, "model": "B", "id": "F4_current_tier_count|Kochi|bronze|S_s503", "sample": 3, "lucky": true, "family": "F4", "template": "F4_current_tier_count", "label": "wrong_table", "nl2sql_bugs": "Table-related", "what": "wrong table entirely", "note": "counts customers with orders, ignores tier_history", "question": "How many customers from Kochi are currently in the bronze tier?", "gold_sql": "SELECT COUNT(*) FROM tier_history t JOIN customers c ON c.customer_id = t.customer_id WHERE c.city = 'Kochi' AND t.tier = 'bronze' AND t.valid_from = (SELECT MAX(t2.valid_from) FROM tier_history t2 WHERE t2.customer_id = t.customer_id)", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM orders o JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Kochi' AND o.status IN ('placed', 'shipped')"}
22
+ {"n": 21, "model": "B", "id": "F2_units_paid|electronics|2024|S_s503", "sample": 2, "lucky": true, "family": "F2", "template": "F2_units_paid", "label": "count_for_sum", "nl2sql_bugs": "Function-related", "what": "COUNT(*) instead of SUM(quantity)", "note": "also order_date for payment date", "question": "How many units of electronics products were in orders that received a payment in 2024 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'electronics' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2024')", "sql": "SELECT COUNT(*) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'electronics' AND substr(o.order_date, 1, 4) = '2024'"}
23
+ {"n": 22, "model": "B", "id": "F1_category_buyers|books|2024|S_s502", "sample": 3, "lucky": false, "family": "F1", "template": "F1_category_buyers", "label": "value_linking", "nl2sql_bugs": "Value-related", "what": "product category matched against customer columns, or hallucinated value", "note": "also compares status to a year", "question": "How many distinct customers bought a books product in 2024? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'books' AND substr(o.order_date, 1, 4) = '2024'", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM orders o JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Books' AND substr(o.status, 1, 5) = '2024'"}
24
+ {"n": 23, "model": "B", "id": "F2_units_paid|electronics|2024|S_s503", "sample": 5, "lucky": false, "family": "F2", "template": "F2_units_paid", "label": "wrong_date_col", "nl2sql_bugs": "Attribute-related", "what": "order_date used where the question says payment date", "note": "", "question": "How many units of electronics products were in orders that received a payment in 2024 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'electronics' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2024')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'electronics' AND substr(o.order_date, 1, 4) = '2024'"}
25
+ {"n": 24, "model": "B", "id": "F3_avg_order|Jaipur|2025|S_s503", "sample": 0, "lucky": false, "family": "F3", "template": "F3_avg_order", "label": "wrong_grain", "nl2sql_bugs": "Clause-related", "what": "AVG over order items instead of per-order totals", "note": "", "question": "What is the average gross value of active orders placed in 2025 by customers in Jaipur? An order's gross value is the sum of quantity \u00d7 unit price over its items.", "gold_sql": "SELECT AVG(t.v) FROM (SELECT o.order_id, SUM(oi.quantity * oi.unit_price) AS v FROM orders o JOIN order_items oi ON oi.order_id = o.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Jaipur' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2025' GROUP BY o.order_id) t", "sql": "SELECT AVG(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Jaipur' AND o.status IN ('placed', 'shipped') AND substr(o.order_date, 1, 4) = '2025'"}
26
+ {"n": 25, "model": "B", "id": "F4_current_tier_count|Nagpur|bronze|S_s503", "sample": 6, "lucky": false, "family": "F4", "template": "F4_current_tier_count", "label": "missing_current", "nl2sql_bugs": "Condition-related", "what": "no latest-row (current tier) filter on tier_history", "note": "", "question": "How many customers from Nagpur are currently in the bronze tier?", "gold_sql": "SELECT COUNT(*) FROM tier_history t JOIN customers c ON c.customer_id = t.customer_id WHERE c.city = 'Nagpur' AND t.tier = 'bronze' AND t.valid_from = (SELECT MAX(t2.valid_from) FROM tier_history t2 WHERE t2.customer_id = t.customer_id)", "sql": "SELECT COUNT(*) FROM customers c JOIN tier_history th ON th.customer_id = c.customer_id WHERE c.city = 'Nagpur' AND th.tier = 'bronze'"}
27
+ {"n": 26, "model": "B", "id": "F1_category_buyers|apparel|2024|S_s502", "sample": 3, "lucky": false, "family": "F1", "template": "F1_category_buyers", "label": "value_linking", "nl2sql_bugs": "Value-related", "what": "product category matched against customer columns, or hallucinated value", "note": "invented city 'Malaga'", "question": "How many distinct customers bought a apparel product in 2024? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'apparel' AND substr(o.order_date, 1, 4) = '2024'", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM orders o JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Malaga' AND substr(o.order_date, 1, 4) = '2024'"}
28
+ {"n": 27, "model": "B", "id": "F2_units_paid|grocery|2025|S_s502", "sample": 0, "lucky": false, "family": "F2", "template": "F2_units_paid", "label": "wrong_date_col", "nl2sql_bugs": "Attribute-related", "what": "order_date used where the question says payment date", "note": "", "question": "How many units of grocery products were in orders that received a payment in 2025 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'grocery' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2025')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'grocery' AND substr(o.order_date, 1, 4) = '2025'"}
29
+ {"n": 28, "model": "B", "id": "F3_avg_order|Pune|2024|S_s501", "sample": 0, "lucky": false, "family": "F3", "template": "F3_avg_order", "label": "wrong_grain", "nl2sql_bugs": "Clause-related", "what": "AVG over order items instead of per-order totals", "note": "", "question": "What is the average gross value of active orders placed in 2024 by customers in Pune? An order's gross value is the sum of quantity \u00d7 unit price over its items.", "gold_sql": "SELECT AVG(t.v) FROM (SELECT o.order_id, SUM(oi.quantity * oi.unit_price) AS v FROM orders o JOIN order_items oi ON oi.order_id = o.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Pune' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2024' GROUP BY o.order_id) t", "sql": "SELECT AVG(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Pune' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2024'"}
30
+ {"n": 29, "model": "B", "id": "F4_revenue_by_current_tier|Pune|2025|S_s501", "sample": 5, "lucky": false, "family": "F4", "template": "F4_revenue_by_current_tier", "label": "invalid_sql", "nl2sql_bugs": "Others", "what": "does not run: undefined alias, unknown column or function", "note": "now() is not SQLite; also no status filter", "question": "For each current customer tier, what was the gross revenue from customers in Pune in 2025? Return tier and revenue.", "gold_sql": "SELECT t.tier, SUM(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id JOIN tier_history t ON t.customer_id = o.customer_id WHERE c.city = 'Pune' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2025' AND t.valid_from = (SELECT MAX(t2.valid_from) FROM tier_history t2 WHERE t2.customer_id = t.customer_id) GROUP BY t.tier", "sql": "SELECT h.tier, SUM(oi.quantity * oi.unit_price) FROM tier_history h JOIN customers c ON c.customer_id = h.customer_id JOIN orders o ON o.customer_id = c.customer_id JOIN order_items oi ON oi.order_id = o.order_id WHERE c.city = 'Pune' AND substr(o.order_date, 1, 4) = '2025' AND h.valid_from = substring(now(), 1, 4) GROUP BY h.tier"}
31
+ {"n": 30, "model": "B", "id": "F1_category_buyers|home|2025|S_s502", "sample": 5, "lucky": false, "family": "F1", "template": "F1_category_buyers", "label": "value_linking", "nl2sql_bugs": "Value-related", "what": "product category matched against customer columns, or hallucinated value", "note": "", "question": "How many distinct customers bought a home product in 2025? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'home' AND substr(o.order_date, 1, 4) = '2025'", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM orders o JOIN customers c ON c.customer_id = o.customer_id WHERE substr(o.order_date, 1, 4) = '2025' AND c.city = 'home'"}
32
+ {"n": 31, "model": "B", "id": "F2_units_paid|grocery|2025|S_s501", "sample": 1, "lucky": false, "family": "F2", "template": "F2_units_paid", "label": "invalid_sql", "nl2sql_bugs": "Others", "what": "does not run: undefined alias, unknown column or function", "note": "otherwise close to gold", "question": "How many units of grocery products were in orders that received a payment in 2025 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'grocery' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2025')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE o.order_id IN (SELECT order_id FROM payments WHERE substr(pay.paid_date, 1, 4) = '2025') AND p.category = 'grocery'"}
33
+ {"n": 32, "model": "C", "id": "F1_category_buyers|toys|2024|S_s501", "sample": 1, "lucky": true, "family": "F1", "template": "F1_category_buyers", "label": "extra_filter", "nl2sql_bugs": "Condition-related", "what": "extra status filter the question does not ask for", "note": "", "question": "How many distinct customers bought a toys product in 2024? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'toys' AND substr(o.order_date, 1, 4) = '2024'", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'toys' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2024'"}
34
+ {"n": 33, "model": "C", "id": "F2_units_paid|books|2024|S_s503", "sample": 5, "lucky": true, "family": "F2", "template": "F2_units_paid", "label": "wrong_date_col", "nl2sql_bugs": "Attribute-related", "what": "order_date used where the question says payment date", "note": "payments of any date", "question": "How many units of books products were in orders that received a payment in 2024 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'books' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2024')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'books' AND substr(o.order_date, 1, 4) = '2024' AND o.order_id IN (SELECT order_id FROM payments)"}
35
+ {"n": 34, "model": "C", "id": "F4_current_tier_list|Delhi|silver|S_s501", "sample": 3, "lucky": true, "family": "F4", "template": "F4_current_tier_list", "label": "missing_current", "nl2sql_bugs": "Condition-related", "what": "no latest-row (current tier) filter on tier_history", "note": "", "question": "List the IDs of customers from Delhi whose current tier is silver.", "gold_sql": "SELECT t.customer_id FROM tier_history t JOIN customers c ON c.customer_id = t.customer_id WHERE c.city = 'Delhi' AND t.tier = 'silver' AND t.valid_from = (SELECT MAX(t2.valid_from) FROM tier_history t2 WHERE t2.customer_id = t.customer_id)", "sql": "SELECT h.customer_id FROM tier_history h JOIN customers c ON c.customer_id = h.customer_id WHERE c.city = 'Delhi' AND h.tier = 'silver'"}
36
+ {"n": 35, "model": "C", "id": "F1_category_buyers|books|2024|S_s502", "sample": 3, "lucky": true, "family": "F1", "template": "F1_category_buyers", "label": "extra_filter", "nl2sql_bugs": "Condition-related", "what": "extra status filter the question does not ask for", "note": "", "question": "How many distinct customers bought a books product in 2024? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'books' AND substr(o.order_date, 1, 4) = '2024'", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'books' AND o.status IN ('placed', 'shipped') AND o.order_date LIKE '2024-%'"}
37
+ {"n": 36, "model": "C", "id": "F2_units_paid|apparel|2024|S_s502", "sample": 5, "lucky": true, "family": "F2", "template": "F2_units_paid", "label": "count_for_sum", "nl2sql_bugs": "Function-related", "what": "COUNT(*) instead of SUM(quantity)", "note": "also order_date for payment date", "question": "How many units of apparel products were in orders that received a payment in 2024 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'apparel' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2024')", "sql": "SELECT COUNT(*) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'apparel' AND substr(o.order_date, 1, 4) = '2024'"}
38
+ {"n": 37, "model": "C", "id": "F4_net_invoice|Indore|2024|S_s503", "sample": 4, "lucky": true, "family": "F4", "template": "F4_net_invoice", "label": "missing_table", "nl2sql_bugs": "Table-related", "what": "invoice_adjustments left out of net invoice", "note": "also includes cancelled orders", "question": "What is the total net invoice amount of shipped orders placed in 2024 by customers from Indore?", "gold_sql": "SELECT (SELECT SUM(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Indore' AND o.status = 'shipped' AND substr(o.order_date, 1, 4) = '2024') + (SELECT COALESCE(SUM(a.amount), 0) FROM invoice_adjustments a JOIN orders o ON o.order_id = a.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Indore' AND o.status = 'shipped' AND substr(o.order_date, 1, 4) = '2024')", "sql": "SELECT SUM(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Indore' AND o.status IN ('shipped', 'cancelled') AND substr(o.order_date, 1, 4) = '2024'"}
39
+ {"n": 38, "model": "C", "id": "F1_category_buyers|grocery|2025|S_s503", "sample": 2, "lucky": false, "family": "F1", "template": "F1_category_buyers", "label": "value_linking", "nl2sql_bugs": "Value-related", "what": "product category matched against customer columns, or hallucinated value", "note": "", "question": "How many distinct customers bought a grocery product in 2025? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'grocery' AND substr(o.order_date, 1, 4) = '2025'", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM orders o JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'grocery' AND substr(o.order_date, 1, 4) = '2025'"}
40
+ {"n": 39, "model": "C", "id": "F2_units_paid|electronics|2024|S_s503", "sample": 2, "lucky": false, "family": "F2", "template": "F2_units_paid", "label": "wrong_date_col", "nl2sql_bugs": "Attribute-related", "what": "order_date used where the question says payment date", "note": "", "question": "How many units of electronics products were in orders that received a payment in 2024 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'electronics' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2024')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'electronics' AND substr(o.order_date, 1, 4) = '2024'"}
41
+ {"n": 40, "model": "C", "id": "F3_avg_order|Delhi|2024|S_s501", "sample": 5, "lucky": false, "family": "F3", "template": "F3_avg_order", "label": "wrong_grain", "nl2sql_bugs": "Clause-related", "what": "AVG over order items instead of per-order totals", "note": "", "question": "What is the average gross value of active orders placed in 2024 by customers in Delhi? An order's gross value is the sum of quantity \u00d7 unit price over its items.", "gold_sql": "SELECT AVG(t.v) FROM (SELECT o.order_id, SUM(oi.quantity * oi.unit_price) AS v FROM orders o JOIN order_items oi ON oi.order_id = o.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Delhi' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2024' GROUP BY o.order_id) t", "sql": "SELECT AVG(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Delhi' AND o.status IN ('placed', 'shipped') AND substr(o.order_date, 1, 4) = '2024'"}
42
+ {"n": 41, "model": "C", "id": "F4_current_tier_count|Surat|bronze|S_s503", "sample": 6, "lucky": false, "family": "F4", "template": "F4_current_tier_count", "label": "missing_current", "nl2sql_bugs": "Condition-related", "what": "no latest-row (current tier) filter on tier_history", "note": "hard-codes a cut-off date", "question": "How many customers from Surat are currently in the bronze tier?", "gold_sql": "SELECT COUNT(*) FROM tier_history t JOIN customers c ON c.customer_id = t.customer_id WHERE c.city = 'Surat' AND t.tier = 'bronze' AND t.valid_from = (SELECT MAX(t2.valid_from) FROM tier_history t2 WHERE t2.customer_id = t.customer_id)", "sql": "SELECT COUNT(*) FROM customers c WHERE c.city = 'Surat' AND c.customer_id IN (SELECT customer_id FROM tier_history th WHERE th.tier = 'bronze' AND th.valid_from <= '2023-12-31')"}
43
+ {"n": 42, "model": "C", "id": "F1_category_buyers|toys|2025|S_s503", "sample": 7, "lucky": false, "family": "F1", "template": "F1_category_buyers", "label": "invalid_sql", "nl2sql_bugs": "Others", "what": "does not run: undefined alias, unknown column or function", "note": "nonexistent oi.customer_id", "question": "How many distinct customers bought a toys product in 2025? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'toys' AND substr(o.order_date, 1, 4) = '2025'", "sql": "SELECT COUNT(DISTINCT oi.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'toys' AND substr(o.order_date, 1, 4) = '2025'"}
44
+ {"n": 43, "model": "C", "id": "F2_units_paid|grocery|2024|S_s502", "sample": 5, "lucky": false, "family": "F2", "template": "F2_units_paid", "label": "wrong_date_col", "nl2sql_bugs": "Attribute-related", "what": "order_date used where the question says payment date", "note": "", "question": "How many units of grocery products were in orders that received a payment in 2024 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'grocery' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2024')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'grocery' AND substr(o.order_date, 1, 4) = '2024'"}
45
+ {"n": 44, "model": "C", "id": "F3_avg_order|Delhi|2024|S_s502", "sample": 3, "lucky": false, "family": "F3", "template": "F3_avg_order", "label": "wrong_grain", "nl2sql_bugs": "Clause-related", "what": "AVG over order items instead of per-order totals", "note": "", "question": "What is the average gross value of active orders placed in 2024 by customers in Delhi? An order's gross value is the sum of quantity \u00d7 unit price over its items.", "gold_sql": "SELECT AVG(t.v) FROM (SELECT o.order_id, SUM(oi.quantity * oi.unit_price) AS v FROM orders o JOIN order_items oi ON oi.order_id = o.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Delhi' AND o.status <> 'cancelled' AND substr(o.order_date, 1, 4) = '2024' GROUP BY o.order_id) t", "sql": "SELECT AVG(oi.quantity * oi.unit_price) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN customers c ON c.customer_id = o.customer_id WHERE c.city = 'Delhi' AND o.status IN ('placed', 'shipped') AND substr(o.order_date, 1, 4) = '2024'"}
46
+ {"n": 45, "model": "C", "id": "F4_current_tier_count|Kochi|bronze|S_s502", "sample": 1, "lucky": false, "family": "F4", "template": "F4_current_tier_count", "label": "missing_current", "nl2sql_bugs": "Condition-related", "what": "no latest-row (current tier) filter on tier_history", "note": "hard-codes a cut-off date", "question": "How many customers from Kochi are currently in the bronze tier?", "gold_sql": "SELECT COUNT(*) FROM tier_history t JOIN customers c ON c.customer_id = t.customer_id WHERE c.city = 'Kochi' AND t.tier = 'bronze' AND t.valid_from = (SELECT MAX(t2.valid_from) FROM tier_history t2 WHERE t2.customer_id = t.customer_id)", "sql": "SELECT COUNT(*) FROM customers c WHERE c.city = 'Kochi' AND EXISTS (SELECT 1 FROM tier_history th WHERE th.customer_id = c.customer_id AND th.tier = 'bronze' AND th.valid_from < '2024-01-01')"}
47
+ {"n": 46, "model": "C", "id": "F1_category_buyers|grocery|2025|S_s502", "sample": 7, "lucky": false, "family": "F1", "template": "F1_category_buyers", "label": "extra_filter", "nl2sql_bugs": "Condition-related", "what": "extra status filter the question does not ask for", "note": "", "question": "How many distinct customers bought a grocery product in 2025? Count orders of any status.", "gold_sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'grocery' AND substr(o.order_date, 1, 4) = '2025'", "sql": "SELECT COUNT(DISTINCT o.customer_id) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'grocery' AND o.status IN ('placed', 'shipped') AND substr(o.order_date, 1, 4) = '2025'"}
48
+ {"n": 47, "model": "C", "id": "F2_units_paid|apparel|2025|S_s503", "sample": 4, "lucky": false, "family": "F2", "template": "F2_units_paid", "label": "invalid_sql", "nl2sql_bugs": "Others", "what": "does not run: undefined alias, unknown column or function", "note": "otherwise close to gold", "question": "How many units of apparel products were in orders that received a payment in 2025 (by payment date)?", "gold_sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'apparel' AND oi.order_id IN (SELECT pay.order_id FROM payments pay WHERE substr(pay.paid_date, 1, 4) = '2025')", "sql": "SELECT SUM(oi.quantity) FROM order_items oi JOIN orders o ON o.order_id = oi.order_id JOIN products p ON p.product_id = oi.product_id WHERE p.category = 'apparel' AND o.order_id IN (SELECT order_id FROM payments WHERE substr(pay.paid_date, 1, 4) = '2025' AND pay.order_id IN (SELECT order_id FROM orders WHERE status <> 'cancelled'))"}
results/manual_audit_summary.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "n": 48,
3
+ "by_label": {
4
+ "extra_filter": 6,
5
+ "wrong_date_col": 11,
6
+ "missing_current": 5,
7
+ "count_for_sum": 3,
8
+ "missing_table": 4,
9
+ "value_linking": 7,
10
+ "wrong_grain": 5,
11
+ "incoherent": 2,
12
+ "wrong_table": 1,
13
+ "invalid_sql": 4
14
+ },
15
+ "lucky_by_label": {
16
+ "extra_filter": 5,
17
+ "wrong_date_col": 4,
18
+ "missing_current": 2,
19
+ "count_for_sum": 3,
20
+ "missing_table": 3,
21
+ "wrong_table": 1
22
+ },
23
+ "by_model_label": {
24
+ "sft_ho": {
25
+ "extra_filter": 2,
26
+ "wrong_date_col": 4,
27
+ "missing_current": 1,
28
+ "count_for_sum": 1,
29
+ "missing_table": 2,
30
+ "value_linking": 3,
31
+ "wrong_grain": 1,
32
+ "incoherent": 2
33
+ },
34
+ "B": {
35
+ "extra_filter": 1,
36
+ "wrong_date_col": 4,
37
+ "missing_table": 1,
38
+ "wrong_table": 1,
39
+ "count_for_sum": 1,
40
+ "value_linking": 3,
41
+ "wrong_grain": 2,
42
+ "missing_current": 1,
43
+ "invalid_sql": 2
44
+ },
45
+ "C": {
46
+ "extra_filter": 3,
47
+ "wrong_date_col": 3,
48
+ "missing_current": 3,
49
+ "count_for_sum": 1,
50
+ "missing_table": 1,
51
+ "value_linking": 1,
52
+ "wrong_grain": 2,
53
+ "invalid_sql": 2
54
+ }
55
+ },
56
+ "smuggling_or_hacking": 0
57
+ }
test/dbs.tar.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6f6972585de34a2e9a2e0e5284d593d8922305442f9c087fd5056e6451cd69b1
3
  size 192497
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1445e6d358ca6e15b2f3eddf97b4f4b5bf3d25eb8d9a4858f69f2ba4aac1ca71
3
  size 192497
train/dbs.tar.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d7b7f2dcc0271414214dca13741a42fa2cc449c35e75ad4caecd14c493250d03
3
  size 14682025
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f0018cb555c2e21418be11e7538ff581381a3421ec663ef074640c4636dd654
3
  size 14682025