Datasets:
category stringclasses 110
values | domain stringclasses 2
values | family_id stringlengths 24 24 | gold stringclasses 4
values | id stringlengths 64 64 | language stringclasses 1
value | license stringclasses 1
value | query stringlengths 48 349 | questions stringlengths 551 1.53k | result stringlengths 2 19.1k | source stringclasses 3
values | split stringclasses 1
value | sql stringlengths 42 275 | sql_parameters stringlengths 2 35 | state stringlengths 231 626 | task stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
single_table/or/ranked | sensor | 779ccaba27a1674613f65598 | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | d7402e8b425b3a48c9409b29353796e5458401926e86b5d4625561afad2f6636 | en | CC-BY-4.0 | Return the maximum of eps1_mean for hydraulic cycles where (fs1_mean is at most 6.63763 or ts1_mean is greater than 52.59775), grouped by valve; return at most 3 groups ordered by aggregate value ASC, breaking ties by valve ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[6.63763,52.59775],\"sql\":\"SELECT valve, MAX(eps1_mean) AS value FROM hydraulic_cycles WHERE (fs1_mean <= ? OR ts1_mean > ?) GROUP BY valve ORDER BY value DESC, valve ASC LIMIT 3\"}","plan_2":"{\"parameters\":[6.63763,52.59775],\"sql\":\"SELECT valve, COUNT(*) AS value F... | [[100,2716.9452],[80,2728.44763],[90,2736.7313]] | hydraulic | train | SELECT valve, MAX(eps1_mean) AS value FROM hydraulic_cycles WHERE (fs1_mean <= ? OR ts1_mean > ?) GROUP BY valve ORDER BY value ASC, valve ASC LIMIT 3 | [6.63763,52.59775] | {"question":"Return the maximum of eps1_mean for hydraulic cycles where (fs1_mean is at most 6.63763 or ts1_mean is greater than 52.59775), grouped by valve; return at most 3 groups ordered by aggregate value ASC, breaking ties by valve ascending.","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER... | text_to_sql_plan_selection |
join/date/or/ranked | commerce | 9994d6961a400ae2962ca892 | {"plan":{"confidence":1,"label":"plan_1","probabilities":{"plan_1":1,"plan_2":0,"plan_3":0,"plan_4":0},"type":"choice"}} | 3a6f6e50ce44d3f0c61d404d2bc08123655721c7bb6b13c4a0c90ccefb0672af | en | CC-BY-4.0 | Return the maximum of l.unit_price for retail lines joined to their invoices where (l.unit_price is at most 49.95 or i.invoice_date is before '2010-12-02'), grouped by i.country; return at most 3 groups ordered by aggregate value ASC, breaking ties by i.country ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[49.95,\"2010-12-02\"],\"sql\":\"SELECT i.country, MAX(l.unit_price) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (l.unit_price <= ? OR i.invoice_date < ?) GROUP BY i.country ORDER BY value ASC, i.country ASC LIMIT 3\"}","plan_2":"{\"p... | [["Canada",1.25],["USA",2.55],["Cyprus",7.95]] | online_retail_ii | train | SELECT i.country, MAX(l.unit_price) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (l.unit_price <= ? OR i.invoice_date < ?) GROUP BY i.country ORDER BY value ASC, i.country ASC LIMIT 3 | [49.95,"2010-12-02"] | {"question":"Return the maximum of l.unit_price for retail lines joined to their invoices where (l.unit_price is at most 49.95 or i.invoice_date is before '2010-12-02'), grouped by i.country; return at most 3 groups ordered by aggregate value ASC, breaking ties by i.country ascending.","schema":{"retail_invoices":{"cou... | text_to_sql_plan_selection |
single_table/and/ranked | commerce | de893db9b5f3722d1d230cbd | {"plan":{"confidence":1,"label":"plan_1","probabilities":{"plan_1":1,"plan_2":0,"plan_3":0,"plan_4":0},"type":"choice"}} | b49aae24ee13e0cb746aaed773e786c9c64f59a485d9f2d1547ee2203921a080 | en | CC-BY-4.0 | Return the minimum of product_related for shopping sessions where (administrative is at most 7 and product_duration is at most 472.4166667), grouped by revenue; return at most 5 groups ordered by aggregate value DESC, breaking ties by revenue ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[7,472.4166667],\"sql\":\"SELECT revenue, MIN(product_related) AS value FROM shopping_sessions WHERE (administrative <= ? AND product_duration <= ?) GROUP BY revenue ORDER BY value DESC, revenue ASC LIMIT 5\"}","plan_2":"{\"parameters\":[7,472.4166667],\"sql\":\"SELECT rev... | [[0,0],[1,0]] | online_shoppers | train | SELECT revenue, MIN(product_related) AS value FROM shopping_sessions WHERE (administrative <= ? AND product_duration <= ?) GROUP BY revenue ORDER BY value DESC, revenue ASC LIMIT 5 | [7,472.4166667] | {"question":"Return the minimum of product_related for shopping sessions where (administrative is at most 7 and product_duration is at most 472.4166667), grouped by revenue; return at most 5 groups ordered by aggregate value DESC, breaking ties by revenue ascending.","schema":{"shopping_sessions":{"administrative":"INT... | text_to_sql_plan_selection |
single_table/and/grouped | commerce | 006fdad1766bf95f5ee76bc2 | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | ebf21b06be73523a108229bb049382f4999a774ba89566e9f048bedcff3f22f6 | en | CC-BY-4.0 | Return the minimum of administrative for shopping sessions where (month equals 'Feb' and product_related is greater than 31), grouped by revenue, ordered by revenue ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"Feb\",31],\"sql\":\"SELECT revenue, MIN(administrative) AS value FROM shopping_sessions WHERE (month = ? OR product_related > ?) GROUP BY revenue ORDER BY revenue ASC\"}","plan_2":"{\"parameters\":[\"Feb\",31],\"sql\":\"SELECT revenue, COUNT(*) AS value FROM shopping_se... | [[0,0],[1,10]] | online_shoppers | train | SELECT revenue, MIN(administrative) AS value FROM shopping_sessions WHERE (month = ? AND product_related > ?) GROUP BY revenue ORDER BY revenue ASC | ["Feb",31] | {"question":"Return the minimum of administrative for shopping sessions where (month equals 'Feb' and product_related is greater than 31), grouped by revenue, ordered by revenue ascending.","schema":{"shopping_sessions":{"administrative":"INTEGER","month":"TEXT","product_duration":"REAL","product_related":"INTEGER","re... | text_to_sql_plan_selection |
single_table/or/having | sensor | 8e0cf4ce2d3149385ef190a4 | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 73eab04e373c67ab86222c2f23d4958cd667a1781ce53bf28a61e55b78a4802c | en | CC-BY-4.0 | Return the maximum of vs1_mean for hydraulic cycles where (accumulator equals 115 or ps1_mean is greater than 160.79926), grouped by cooler, keeping only groups with at least 2 matching rows; return at most 5 groups ordered by aggregate value DESC, breaking ties by cooler ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[115,160.79926,2],\"sql\":\"SELECT cooler, MAX(vs1_mean) AS value FROM hydraulic_cycles WHERE (accumulator = ? AND ps1_mean > ?) GROUP BY cooler HAVING COUNT(*) >= ? ORDER BY value DESC, cooler ASC LIMIT 5\"}","plan_2":"{\"parameters\":[115,160.79926,2],\"sql\":\"SELECT co... | [[3,0.82955],[20,0.6943],[100,0.6431]] | hydraulic | train | SELECT cooler, MAX(vs1_mean) AS value FROM hydraulic_cycles WHERE (accumulator = ? OR ps1_mean > ?) GROUP BY cooler HAVING COUNT(*) >= ? ORDER BY value DESC, cooler ASC LIMIT 5 | [115,160.79926,2] | {"question":"Return the maximum of vs1_mean for hydraulic cycles where (accumulator equals 115 or ps1_mean is greater than 160.79926), grouped by cooler, keeping only groups with at least 2 matching rows; return at most 5 groups ordered by aggregate value DESC, breaking ties by cooler ascending.","schema":{"hydraulic_c... | text_to_sql_plan_selection |
join/and/grouped | commerce | cbb9acfd737fb6669c4551a1 | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 1a6df7f61defda6ed235b7a61876917ec443415e453e8a8ac7540324fc72c8ea | en | CC-BY-4.0 | Return the maximum of l.quantity for retail lines joined to their invoices where (l.quantity is at most 1800 and l.unit_price is greater than 8.5), grouped by i.invoice_date, ordered by i.invoice_date ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[1800,8.5],\"sql\":\"SELECT i.invoice_date, MAX(l.quantity) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (l.quantity <= ? OR l.unit_price > ?) GROUP BY i.invoice_date ORDER BY i.invoice_date ASC\"}","plan_2":"{\"parameters\":[1800,8.5]... | [["2009-12-02",12],["2009-12-03",1],["2009-12-04",1],["2009-12-05",14],["2009-12-06",2],["2009-12-07",10],["2009-12-08",1],["2009-12-09",36],["2009-12-10",2],["2009-12-11",3],["2009-12-13",36],["2009-12-14",8],["2009-12-15",50],["2009-12-16",4],["2009-12-17",16],["2009-12-18",48],["2009-12-20",9],["2009-12-21",1],["200... | online_retail_ii | train | SELECT i.invoice_date, MAX(l.quantity) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (l.quantity <= ? AND l.unit_price > ?) GROUP BY i.invoice_date ORDER BY i.invoice_date ASC | [1800,8.5] | {"question":"Return the maximum of l.quantity for retail lines joined to their invoices where (l.quantity is at most 1800 and l.unit_price is greater than 8.5), grouped by i.invoice_date, ordered by i.invoice_date ascending.","schema":{"retail_invoices":{"country":"TEXT","customer_id":"TEXT","invoice":"TEXT","invoice_d... | text_to_sql_plan_selection |
single_table/date/or/having | commerce | e9129b3763322e1efcbb2392 | {"plan":{"confidence":1,"label":"plan_2","probabilities":{"plan_1":0,"plan_2":1,"plan_3":0,"plan_4":0},"type":"choice"}} | 359447e54942f708f0b2f03dbf0894244753e0d0ddd9f2a961a0a43a70aa67f2 | en | CC-BY-4.0 | Return the minimum of quantity for retail invoice lines where (unit_price is greater than 49.95 or invoice_date is before '2011-09-29'), grouped by country, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by country ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[49.95,\"2011-09-29\",10],\"sql\":\"SELECT country, MIN(quantity) AS value FROM retail_lines WHERE (unit_price > ? AND invoice_date < ?) GROUP BY country HAVING COUNT(*) >= ? ORDER BY value ASC, country ASC LIMIT 3\"}","plan_2":"{\"parameters\":[49.95,\"2011-09-29\",10],\"... | [["Austria",1],["Belgium",1],["EIRE",1]] | online_retail_ii | train | SELECT country, MIN(quantity) AS value FROM retail_lines WHERE (unit_price > ? OR invoice_date < ?) GROUP BY country HAVING COUNT(*) >= ? ORDER BY value ASC, country ASC LIMIT 3 | [49.95,"2011-09-29",10] | {"question":"Return the minimum of quantity for retail invoice lines where (unit_price is greater than 49.95 or invoice_date is before '2011-09-29'), grouped by country, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by country ascending.","sche... | text_to_sql_plan_selection |
single_table/ranked | commerce | 1d170b2db5fde57f9535d5cd | {"plan":{"confidence":1,"label":"plan_2","probabilities":{"plan_1":0,"plan_2":1,"plan_3":0,"plan_4":0},"type":"choice"}} | 6b91c0259b7087bb8f13c105d51c6cce35c8bc045adb2480db0fc57c2526f448 | en | CC-BY-4.0 | Return the maximum of administrative for shopping sessions where (traffic_type equals 12), grouped by revenue; return at most 3 groups ordered by aggregate value ASC, breaking ties by revenue ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[12],\"sql\":\"SELECT revenue, COUNT(*) AS value FROM shopping_sessions WHERE (traffic_type = ?) GROUP BY revenue ORDER BY value ASC, revenue ASC LIMIT 3\"}","plan_2":"{\"parameters\":[12],\"sql\":\"SELECT revenue, MAX(administrative) AS value FROM shopping_sessions WHERE ... | [[0,0]] | online_shoppers | train | SELECT revenue, MAX(administrative) AS value FROM shopping_sessions WHERE (traffic_type = ?) GROUP BY revenue ORDER BY value ASC, revenue ASC LIMIT 3 | [12] | {"question":"Return the maximum of administrative for shopping sessions where (traffic_type equals 12), grouped by revenue; return at most 3 groups ordered by aggregate value ASC, breaking ties by revenue ascending.","schema":{"shopping_sessions":{"administrative":"INTEGER","month":"TEXT","product_duration":"REAL","pro... | text_to_sql_plan_selection |
single_table/and/aggregate | sensor | 077d2375b13323c28574b94d | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | b3217fb309f7c23527619fbc52f0ca784991c810a36ded98a3d90929e6dbae99 | en | CC-BY-4.0 | Return the maximum of eps1_mean for hydraulic cycles where (cooler equals 20 and ps1_mean is at most 172.56377). | {"plan":{"criteria":{"plan_1":"{\"parameters\":[20,172.56377],\"sql\":\"SELECT MAX(eps1_mean) AS value FROM hydraulic_cycles WHERE (cooler = ? OR ps1_mean <= ?)\"}","plan_2":"{\"parameters\":[20,172.56377],\"sql\":\"SELECT COUNT(*) AS value FROM hydraulic_cycles WHERE (cooler = ? AND ps1_mean <= ?)\"}","plan_3":"{\"par... | [[2497.67583]] | hydraulic | train | SELECT MAX(eps1_mean) AS value FROM hydraulic_cycles WHERE (cooler = ? AND ps1_mean <= ?) | [20,172.56377] | {"question":"Return the maximum of eps1_mean for hydraulic cycles where (cooler equals 20 and ps1_mean is at most 172.56377).","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTEGER","eps1_mean":"REAL","fs1_mean":"REAL","ps1_mean":"REAL","ps2_mean":"REAL","pump_leakage":"INTEGER","... | text_to_sql_plan_selection |
single_table/having | sensor | 94a71c11ae7cf6a086045edb | {"plan":{"confidence":1,"label":"plan_2","probabilities":{"plan_1":0,"plan_2":1,"plan_3":0,"plan_4":0},"type":"choice"}} | 8761687930454fb854bd40332365030d6a0398c3d41a1c99d0a22a6d0efc4d06 | en | CC-BY-4.0 | Return the minimum of ps2_mean for hydraulic cycles where (eps1_mean is greater than 2480.92663), grouped by cooler, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by cooler ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[2480.92663,10],\"sql\":\"SELECT cooler, MIN(ps2_mean) AS value FROM hydraulic_cycles WHERE (eps1_mean > ?) GROUP BY cooler HAVING COUNT(*) >= ? ORDER BY value DESC, cooler ASC LIMIT 3\"}","plan_2":"{\"parameters\":[2480.92663,10],\"sql\":\"SELECT cooler, MIN(ps2_mean) AS ... | [[20,106.62654],[100,108.37049],[3,108.52974]] | hydraulic | train | SELECT cooler, MIN(ps2_mean) AS value FROM hydraulic_cycles WHERE (eps1_mean > ?) GROUP BY cooler HAVING COUNT(*) >= ? ORDER BY value ASC, cooler ASC LIMIT 3 | [2480.92663,10] | {"question":"Return the minimum of ps2_mean for hydraulic cycles where (eps1_mean is greater than 2480.92663), grouped by cooler, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by cooler ascending.","schema":{"hydraulic_cycles":{"accumulator":"I... | text_to_sql_plan_selection |
single_table/and/having | sensor | 1daa2bf2c7cc213bec6d7e55 | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | 01c68f2764ecc261d182a70c500edf85418cd4a0591927cc03c8fea416a35d49 | en | CC-BY-4.0 | Return the average of vs1_mean for hydraulic cycles where (ps2_mean is at most 107.17314 and ts1_mean is at most 52.59775), grouped by cooler, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by cooler ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[107.17314,52.59775,10],\"sql\":\"SELECT cooler, AVG(vs1_mean) AS value FROM hydraulic_cycles WHERE (ps2_mean <= ? OR ts1_mean <= ?) GROUP BY cooler HAVING COUNT(*) >= ? ORDER BY value ASC, cooler ASC LIMIT 3\"}","plan_2":"{\"parameters\":[107.17314,52.59775,10],\"sql\":\"... | [[20,0.6140279695431472],[3,0.6400233333333334]] | hydraulic | train | SELECT cooler, AVG(vs1_mean) AS value FROM hydraulic_cycles WHERE (ps2_mean <= ? AND ts1_mean <= ?) GROUP BY cooler HAVING COUNT(*) >= ? ORDER BY value ASC, cooler ASC LIMIT 3 | [107.17314,52.59775,10] | {"question":"Return the average of vs1_mean for hydraulic cycles where (ps2_mean is at most 107.17314 and ts1_mean is at most 52.59775), grouped by cooler, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by cooler ascending.","schema":{"hydraulic... | text_to_sql_plan_selection |
single_table/ranked | sensor | 9ea96637aaf7da5042731c14 | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | 739b18e784f69e3edf561955fe76f8eba8f5be29f9b72b00a738acab3b8d3584 | en | CC-BY-4.0 | Return the sum of ps2_mean for hydraulic cycles where (eps1_mean is greater than 2480.92663), grouped by cooler; return at most 5 groups ordered by aggregate value DESC, breaking ties by cooler ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[2480.92663],\"sql\":\"SELECT cooler, SUM(ps2_mean) AS value FROM hydraulic_cycles WHERE (eps1_mean > ?) GROUP BY cooler ORDER BY value ASC, cooler ASC LIMIT 5\"}","plan_2":"{\"parameters\":[2480.92663],\"sql\":\"SELECT cooler, COUNT(*) AS value FROM hydraulic_cycles WHERE... | [[100,80736.10154],[3,30496.80534],[20,12219.09081]] | hydraulic | train | SELECT cooler, SUM(ps2_mean) AS value FROM hydraulic_cycles WHERE (eps1_mean > ?) GROUP BY cooler ORDER BY value DESC, cooler ASC LIMIT 5 | [2480.92663] | {"question":"Return the sum of ps2_mean for hydraulic cycles where (eps1_mean is greater than 2480.92663), grouped by cooler; return at most 5 groups ordered by aggregate value DESC, breaking ties by cooler ascending.","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTEGER","eps1_m... | text_to_sql_plan_selection |
single_table/and/grouped | commerce | 2701a0b26bc47530159aa3a7 | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | 84f2e9770ecf5dd7c30f1f665aadf4cdafa0d437de7bc25300b5d0ebce520d42 | en | CC-BY-4.0 | Return the sum of product_related for shopping sessions where (month equals 'Nov' and product_related is at most 226), grouped by revenue, ordered by revenue ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"Nov\",226],\"sql\":\"SELECT revenue, SUM(product_related) AS value FROM shopping_sessions WHERE (month = ? OR product_related <= ?) GROUP BY revenue ORDER BY revenue ASC\"}","plan_2":"{\"parameters\":[\"Nov\",226],\"sql\":\"SELECT revenue, COUNT(*) AS value FROM shoppin... | [[0,73004],[1,43398]] | online_shoppers | train | SELECT revenue, SUM(product_related) AS value FROM shopping_sessions WHERE (month = ? AND product_related <= ?) GROUP BY revenue ORDER BY revenue ASC | ["Nov",226] | {"question":"Return the sum of product_related for shopping sessions where (month equals 'Nov' and product_related is at most 226), grouped by revenue, ordered by revenue ascending.","schema":{"shopping_sessions":{"administrative":"INTEGER","month":"TEXT","product_duration":"REAL","product_related":"INTEGER","region":"... | text_to_sql_plan_selection |
single_table/and/ranked | commerce | ca2041c22ac7e48bb165a100 | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | cac2613fada7cf6e4db8b8a82944f55d75b2e15e6b38ec739d0bb2c9c7cc1c47 | en | CC-BY-4.0 | Return the sum of unit_price for retail invoice lines where (country equals 'Canada' and unit_price is at most 0.55), grouped by country; return at most 5 groups ordered by aggregate value DESC, breaking ties by country ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"Canada\",0.55],\"sql\":\"SELECT country, SUM(unit_price) AS value FROM retail_lines WHERE (country = ? OR unit_price <= ?) GROUP BY country ORDER BY value DESC, country ASC LIMIT 5\"}","plan_2":"{\"parameters\":[],\"sql\":\"SELECT country, SUM(unit_price) AS value FROM ... | [] | online_retail_ii | train | SELECT country, SUM(unit_price) AS value FROM retail_lines WHERE (country = ? AND unit_price <= ?) GROUP BY country ORDER BY value DESC, country ASC LIMIT 5 | ["Canada",0.55] | {"question":"Return the sum of unit_price for retail invoice lines where (country equals 'Canada' and unit_price is at most 0.55), grouped by country; return at most 5 groups ordered by aggregate value DESC, breaking ties by country ascending.","schema":{"retail_lines":{"country":"TEXT","invoice":"TEXT","invoice_date":... | text_to_sql_plan_selection |
single_table/grouped | commerce | dccddafaebc1652c6a057a31 | {"plan":{"confidence":1,"label":"plan_1","probabilities":{"plan_1":1,"plan_2":0,"plan_3":0,"plan_4":0},"type":"choice"}} | cdb04b48406a8e024b8a6bb88716427da8509b442733a3ba4fb38f1600fcf4db | en | CC-BY-4.0 | Return the number of rows for shopping sessions where (product_duration is at most 167.5), grouped by month, ordered by month ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[167.5],\"sql\":\"SELECT month, COUNT(*) AS value FROM shopping_sessions WHERE (product_duration <= ?) GROUP BY month ORDER BY month ASC\"}","plan_2":"{\"parameters\":[167.5],\"sql\":\"SELECT month, SUM(administrative) AS value FROM shopping_sessions WHERE (product_duratio... | [["Aug",84],["Dec",407],["Feb",85],["Jul",101],["June",88],["Mar",549],["May",859],["Nov",549],["Oct",111],["Sep",83]] | online_shoppers | train | SELECT month, COUNT(*) AS value FROM shopping_sessions WHERE (product_duration <= ?) GROUP BY month ORDER BY month ASC | [167.5] | {"question":"Return the number of rows for shopping sessions where (product_duration is at most 167.5), grouped by month, ordered by month ascending.","schema":{"shopping_sessions":{"administrative":"INTEGER","month":"TEXT","product_duration":"REAL","product_related":"INTEGER","region":"INTEGER","revenue":"INTEGER","se... | text_to_sql_plan_selection |
join/null/having | commerce | 5569498f2bd149ce75bf95b1 | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | 063f9debfba3b3bc370dd6382e7e54d4c5b8d1c8b43766ab050cc54275bdf857 | en | CC-BY-4.0 | Return the maximum of l.unit_price for retail lines joined to their invoices where (i.customer_id is missing), grouped by i.invoice_date, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by i.invoice_date ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[],\"sql\":\"SELECT i.invoice_date, MAX(l.unit_price) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (i.customer_id IS NULL) GROUP BY i.invoice_date ORDER BY value ASC, i.invoice_date ASC LIMIT 3\"}","plan_2":"{\"parameters\":[10],\"sql\... | [["2010-10-19",1.95],["2009-12-06",2.95],["2010-04-16",2.95]] | online_retail_ii | train | SELECT i.invoice_date, MAX(l.unit_price) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (i.customer_id IS NULL) GROUP BY i.invoice_date HAVING COUNT(*) >= ? ORDER BY value ASC, i.invoice_date ASC LIMIT 3 | [10] | {"question":"Return the maximum of l.unit_price for retail lines joined to their invoices where (i.customer_id is missing), grouped by i.invoice_date, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by i.invoice_date ascending.","schema":{"retail... | text_to_sql_plan_selection |
join/date/and/having | commerce | 54be05cfe7abf1fc7afa98fb | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | 6d80c32724f67be590be8dc1c4b19959141f71b043e6515f28ec8aad36c3688a | en | CC-BY-4.0 | Return the average of l.unit_price for retail lines joined to their invoices where (l.quantity is greater than 25 and i.invoice_date is on or after '2010-02-18'), grouped by i.country, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by i.country ... | {"plan":{"criteria":{"plan_1":"{\"parameters\":[25,\"2010-02-18\",10],\"sql\":\"SELECT i.country, AVG(l.unit_price) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (l.quantity > ? OR i.invoice_date >= ?) GROUP BY i.country HAVING COUNT(*) >= ? ORDER BY value ASC, i.country ASC LIMIT 3... | [["Sweden",1.1271739130434784],["France",1.5635714285714286],["Germany",1.5804]] | online_retail_ii | train | SELECT i.country, AVG(l.unit_price) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (l.quantity > ? AND i.invoice_date >= ?) GROUP BY i.country HAVING COUNT(*) >= ? ORDER BY value ASC, i.country ASC LIMIT 3 | [25,"2010-02-18",10] | {"question":"Return the average of l.unit_price for retail lines joined to their invoices where (l.quantity is greater than 25 and i.invoice_date is on or after '2010-02-18'), grouped by i.country, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties ... | text_to_sql_plan_selection |
single_table/or/ranked | sensor | f0cadcc04e2d7ca41a9e5d2d | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | 7109d24b582bd29df15d3aa7d60308ec0f4f77f6581ecd2a1d2dee79f48583be | en | CC-BY-4.0 | Return the minimum of ps2_mean for hydraulic cycles where (eps1_mean is greater than 2544.76 or ts1_mean is at most 35.56605), grouped by pump_leakage; return at most 5 groups ordered by aggregate value DESC, breaking ties by pump_leakage ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[2544.76,35.56605],\"sql\":\"SELECT pump_leakage, MIN(ps2_mean) AS value FROM hydraulic_cycles WHERE (eps1_mean > ? AND ts1_mean <= ?) GROUP BY pump_leakage ORDER BY value DESC, pump_leakage ASC LIMIT 5\"}","plan_2":"{\"parameters\":[2544.76,35.56605],\"sql\":\"SELECT pump... | [[0,108.96724],[1,108.63409],[2,108.41435]] | hydraulic | train | SELECT pump_leakage, MIN(ps2_mean) AS value FROM hydraulic_cycles WHERE (eps1_mean > ? OR ts1_mean <= ?) GROUP BY pump_leakage ORDER BY value DESC, pump_leakage ASC LIMIT 5 | [2544.76,35.56605] | {"question":"Return the minimum of ps2_mean for hydraulic cycles where (eps1_mean is greater than 2544.76 or ts1_mean is at most 35.56605), grouped by pump_leakage; return at most 5 groups ordered by aggregate value DESC, breaking ties by pump_leakage ascending.","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","c... | text_to_sql_plan_selection |
join/and/aggregate | commerce | bdb6539b9a750c1ff14fdf5a | {"plan":{"confidence":1,"label":"plan_1","probabilities":{"plan_1":1,"plan_2":0,"plan_3":0,"plan_4":0},"type":"choice"}} | 076bfa481dcb3a9527552ccaa2a2b589b9b7a22584588d3ed2996e012e11fc1a | en | CC-BY-4.0 | Return the number of rows for retail lines joined to their invoices where (i.customer_id equals '12353' and l.quantity is greater than 25). | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"12353\",25],\"sql\":\"SELECT COUNT(*) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (i.customer_id = ? AND l.quantity > ?)\"}","plan_2":"{\"parameters\":[\"12353\",25],\"sql\":\"SELECT COUNT(*) AS value FROM retail_lines l JOIN retai... | [[0]] | online_retail_ii | train | SELECT COUNT(*) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (i.customer_id = ? AND l.quantity > ?) | ["12353",25] | {"question":"Return the number of rows for retail lines joined to their invoices where (i.customer_id equals '12353' and l.quantity is greater than 25).","schema":{"retail_invoices":{"country":"TEXT","customer_id":"TEXT","invoice":"TEXT","invoice_date":"TEXT"},"retail_lines":{"country":"TEXT","invoice":"TEXT","invoice_... | text_to_sql_plan_selection |
single_table/having | commerce | e07efdb4f8e7bbe7bdd18668 | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 094dee5a0d97ae17d1812139ff356b963d6e795134395e40147292c60687ffca | en | CC-BY-4.0 | Return the minimum of product_duration for shopping sessions where (product_duration is greater than 1564.0), grouped by revenue, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by revenue ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[1564.0,10],\"sql\":\"SELECT revenue, MIN(product_duration) AS value FROM shopping_sessions WHERE (product_duration > ?) GROUP BY revenue HAVING COUNT(*) >= ? ORDER BY value DESC, revenue ASC LIMIT 3\"}","plan_2":"{\"parameters\":[1564.0,10],\"sql\":\"SELECT revenue, COUNT... | [[0,1564.161905],[1,1565.958333]] | online_shoppers | train | SELECT revenue, MIN(product_duration) AS value FROM shopping_sessions WHERE (product_duration > ?) GROUP BY revenue HAVING COUNT(*) >= ? ORDER BY value ASC, revenue ASC LIMIT 3 | [1564.0,10] | {"question":"Return the minimum of product_duration for shopping sessions where (product_duration is greater than 1564.0), grouped by revenue, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by revenue ascending.","schema":{"shopping_sessions":{"... | text_to_sql_plan_selection |
single_table/and/grouped | sensor | 11a8a3e9b7bcb95e112ab9f9 | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | c4e6914f66489242fc7de14a691409067b78d9473da733014b1a23f2e42451c8 | en | CC-BY-4.0 | Return the maximum of ts1_mean for hydraulic cycles where (ps1_mean is at most 172.56377 and fs1_mean is greater than 6.68926), grouped by valve, ordered by valve ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[172.56377,6.68926],\"sql\":\"SELECT valve, MAX(ts1_mean) AS value FROM hydraulic_cycles WHERE (ps1_mean <= ? OR fs1_mean > ?) GROUP BY valve ORDER BY valve ASC\"}","plan_2":"{\"parameters\":[172.56377,6.68926],\"sql\":\"SELECT valve, COUNT(*) AS value FROM hydraulic_cycle... | [[80,36.2543],[90,44.60135],[100,41.46363]] | hydraulic | train | SELECT valve, MAX(ts1_mean) AS value FROM hydraulic_cycles WHERE (ps1_mean <= ? AND fs1_mean > ?) GROUP BY valve ORDER BY valve ASC | [172.56377,6.68926] | {"question":"Return the maximum of ts1_mean for hydraulic cycles where (ps1_mean is at most 172.56377 and fs1_mean is greater than 6.68926), grouped by valve, ordered by valve ascending.","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTEGER","eps1_mean":"REAL","fs1_mean":"REAL","... | text_to_sql_plan_selection |
single_table/or/ranked | commerce | b82877e4750799b6c29a2785 | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 8a8fdb7a620415388454d0ab1850393f6212af98d11bc2b32fa2cd8b796487e9 | en | CC-BY-4.0 | Return the minimum of administrative for shopping sessions where (administrative is at most 23 or product_related is at most 340), grouped by visitor_type; return at most 5 groups ordered by aggregate value DESC, breaking ties by visitor_type ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[23,340],\"sql\":\"SELECT visitor_type, COUNT(*) AS value FROM shopping_sessions WHERE (administrative <= ? OR product_related <= ?) GROUP BY visitor_type ORDER BY value DESC, visitor_type ASC LIMIT 5\"}","plan_2":"{\"parameters\":[23,340],\"sql\":\"SELECT visitor_type, SU... | [["New_Visitor",0],["Other",0],["Returning_Visitor",0]] | online_shoppers | train | SELECT visitor_type, MIN(administrative) AS value FROM shopping_sessions WHERE (administrative <= ? OR product_related <= ?) GROUP BY visitor_type ORDER BY value DESC, visitor_type ASC LIMIT 5 | [23,340] | {"question":"Return the minimum of administrative for shopping sessions where (administrative is at most 23 or product_related is at most 340), grouped by visitor_type; return at most 5 groups ordered by aggregate value DESC, breaking ties by visitor_type ascending.","schema":{"shopping_sessions":{"administrative":"INT... | text_to_sql_plan_selection |
single_table/aggregate | commerce | 3d1e2ea9f48591a08c231e8e | {"plan":{"confidence":1,"label":"plan_2","probabilities":{"plan_1":0,"plan_2":1,"plan_3":0,"plan_4":0},"type":"choice"}} | b20862b1fbef593b0614891e404398759d9cc6c19bf005e5c2f65b9cc3b32a0f | en | CC-BY-4.0 | Return the number of rows for shopping sessions where (visitor_type equals 'Returning_Visitor'). | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"Returning_Visitor\"],\"sql\":\"SELECT SUM(administrative) AS value FROM shopping_sessions WHERE (visitor_type = ?)\"}","plan_2":"{\"parameters\":[\"Returning_Visitor\"],\"sql\":\"SELECT COUNT(*) AS value FROM shopping_sessions WHERE (visitor_type = ?)\"}","plan_3":"{\"p... | [[10551]] | online_shoppers | train | SELECT COUNT(*) AS value FROM shopping_sessions WHERE (visitor_type = ?) | ["Returning_Visitor"] | {"question":"Return the number of rows for shopping sessions where (visitor_type equals 'Returning_Visitor').","schema":{"shopping_sessions":{"administrative":"INTEGER","month":"TEXT","product_duration":"REAL","product_related":"INTEGER","region":"INTEGER","revenue":"INTEGER","session_id":"INTEGER","traffic_type":"INTE... | text_to_sql_plan_selection |
single_table/having | sensor | c67f6184cc85904a857876f1 | {"plan":{"confidence":1,"label":"plan_2","probabilities":{"plan_1":0,"plan_2":1,"plan_3":0,"plan_4":0},"type":"choice"}} | 6d0384655680b77e9ba450fb50386f8d353538c1e50710b3f224204635cbc0c1 | en | CC-BY-4.0 | Return the number of rows for hydraulic cycles where (vs1_mean is greater than 0.64278), grouped by valve, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by valve ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[0.64278,10],\"sql\":\"SELECT valve, COUNT(*) AS value FROM hydraulic_cycles WHERE (vs1_mean > ?) GROUP BY valve HAVING COUNT(*) >= ? ORDER BY value DESC, valve ASC LIMIT 3\"}","plan_2":"{\"parameters\":[0.64278,10],\"sql\":\"SELECT valve, COUNT(*) AS value FROM hydraulic_... | [[90,102],[80,112],[73,119]] | hydraulic | train | SELECT valve, COUNT(*) AS value FROM hydraulic_cycles WHERE (vs1_mean > ?) GROUP BY valve HAVING COUNT(*) >= ? ORDER BY value ASC, valve ASC LIMIT 3 | [0.64278,10] | {"question":"Return the number of rows for hydraulic cycles where (vs1_mean is greater than 0.64278), grouped by valve, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by valve ascending.","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","co... | text_to_sql_plan_selection |
single_table/ranked | sensor | 34b5308cf3db3277d7e63f0a | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 1f6cb31e4298b0ca80f9abca4698dc7883f00015323b5028bbdeffbaf309b1db | en | CC-BY-4.0 | Return the average of eps1_mean for hydraulic cycles where (eps1_mean is at most 2480.92663), grouped by pump_leakage; return at most 5 groups ordered by aggregate value DESC, breaking ties by pump_leakage ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[2480.92663],\"sql\":\"SELECT pump_leakage, AVG(eps1_mean) AS value FROM hydraulic_cycles WHERE (eps1_mean <= ?) GROUP BY pump_leakage ORDER BY value ASC, pump_leakage ASC LIMIT 5\"}","plan_2":"{\"parameters\":[2480.92663],\"sql\":\"SELECT pump_leakage, COUNT(*) AS value F... | [[1,2451.73223990991],[2,2446.202262631579],[0,2425.437888193384]] | hydraulic | train | SELECT pump_leakage, AVG(eps1_mean) AS value FROM hydraulic_cycles WHERE (eps1_mean <= ?) GROUP BY pump_leakage ORDER BY value DESC, pump_leakage ASC LIMIT 5 | [2480.92663] | {"question":"Return the average of eps1_mean for hydraulic cycles where (eps1_mean is at most 2480.92663), grouped by pump_leakage; return at most 5 groups ordered by aggregate value DESC, breaking ties by pump_leakage ascending.","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTE... | text_to_sql_plan_selection |
join/or/grouped | commerce | 0bbb6d6a2012e07c04b6017f | {"plan":{"confidence":1,"label":"plan_1","probabilities":{"plan_1":1,"plan_2":0,"plan_3":0,"plan_4":0},"type":"choice"}} | 92a8047c8b521e0b404f1dceab01ec58c8ac6fbc80c958057172c4d84edddb13 | en | CC-BY-4.0 | Return the minimum of l.unit_price for retail lines joined to their invoices where (i.customer_id equals '12364' or l.unit_price is at most 0.55), grouped by i.invoice_date, ordered by i.invoice_date ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"12364\",0.55],\"sql\":\"SELECT i.invoice_date, MIN(l.unit_price) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (i.customer_id = ? OR l.unit_price <= ?) GROUP BY i.invoice_date ORDER BY i.invoice_date ASC\"}","plan_2":"{\"parameters\"... | [["2009-12-01",0.42],["2009-12-02",0.21],["2009-12-03",0.21],["2009-12-04",0.29],["2009-12-05",0.06],["2009-12-06",0.19],["2009-12-07",0.42],["2009-12-08",0.42],["2009-12-09",0.19],["2009-12-10",0.19],["2009-12-11",0.42],["2009-12-13",0.38],["2009-12-14",0.19],["2009-12-15",0.21],["2009-12-16",0.34],["2009-12-17",0.29]... | online_retail_ii | train | SELECT i.invoice_date, MIN(l.unit_price) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (i.customer_id = ? OR l.unit_price <= ?) GROUP BY i.invoice_date ORDER BY i.invoice_date ASC | ["12364",0.55] | {"question":"Return the minimum of l.unit_price for retail lines joined to their invoices where (i.customer_id equals '12364' or l.unit_price is at most 0.55), grouped by i.invoice_date, ordered by i.invoice_date ascending.","schema":{"retail_invoices":{"country":"TEXT","customer_id":"TEXT","invoice":"TEXT","invoice_da... | text_to_sql_plan_selection |
single_table/or/grouped | sensor | 659a50365fbee2475b8b593c | {"plan":{"confidence":1,"label":"plan_1","probabilities":{"plan_1":1,"plan_2":0,"plan_3":0,"plan_4":0},"type":"choice"}} | f6c81fa081158579f8c064c0629c7e36558df0bde59e502388641e32b7517c9b | en | CC-BY-4.0 | Return the number of rows for hydraulic cycles where (ps1_mean is at most 160.79926 or eps1_mean is greater than 2598.8769), grouped by valve, ordered by valve ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[160.79926,2598.8769],\"sql\":\"SELECT valve, COUNT(*) AS value FROM hydraulic_cycles WHERE (ps1_mean <= ? OR eps1_mean > ?) GROUP BY valve ORDER BY valve ASC\"}","plan_2":"{\"parameters\":[160.79926,2598.8769],\"sql\":\"SELECT valve, COUNT(*) AS value FROM hydraulic_cycle... | [[73,295],[80,303],[90,317],[100,848]] | hydraulic | train | SELECT valve, COUNT(*) AS value FROM hydraulic_cycles WHERE (ps1_mean <= ? OR eps1_mean > ?) GROUP BY valve ORDER BY valve ASC | [160.79926,2598.8769] | {"question":"Return the number of rows for hydraulic cycles where (ps1_mean is at most 160.79926 or eps1_mean is greater than 2598.8769), grouped by valve, ordered by valve ascending.","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTEGER","eps1_mean":"REAL","fs1_mean":"REAL","ps1... | text_to_sql_plan_selection |
single_table/or/grouped | commerce | da0471c128292364b03128db | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 1db13a667809731ed2817421cae2192d28888055e2ac8343ac0b139bff15138c | en | CC-BY-4.0 | Return the average of quantity for retail invoice lines where (country equals 'Belgium' or unit_price is at most 8.5), grouped by invoice_date, ordered by invoice_date ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"Belgium\",8.5],\"sql\":\"SELECT invoice_date, AVG(quantity) AS value FROM retail_lines WHERE (country = ? AND unit_price <= ?) GROUP BY invoice_date ORDER BY invoice_date ASC\"}","plan_2":"{\"parameters\":[\"Belgium\",8.5],\"sql\":\"SELECT invoice_date, COUNT(*) AS valu... | [["2009-12-01",23.5],["2009-12-02",42.8494623655914],["2009-12-03",243.875],["2009-12-04",38.67213114754098],["2009-12-05",24.375],["2009-12-06",10.862068965517242],["2009-12-07",35.74193548387097],["2009-12-08",57.93827160493827],["2009-12-09",19.7125],["2009-12-10",33.79710144927536],["2009-12-11",10.24],["2009-12-13... | online_retail_ii | train | SELECT invoice_date, AVG(quantity) AS value FROM retail_lines WHERE (country = ? OR unit_price <= ?) GROUP BY invoice_date ORDER BY invoice_date ASC | ["Belgium",8.5] | {"question":"Return the average of quantity for retail invoice lines where (country equals 'Belgium' or unit_price is at most 8.5), grouped by invoice_date, ordered by invoice_date ascending.","schema":{"retail_lines":{"country":"TEXT","invoice":"TEXT","invoice_date":"TEXT","line_id":"INTEGER","quantity":"INTEGER","sto... | text_to_sql_plan_selection |
single_table/or/grouped | commerce | d536fb9240dd3a5434bef1ba | {"plan":{"confidence":1,"label":"plan_1","probabilities":{"plan_1":1,"plan_2":0,"plan_3":0,"plan_4":0},"type":"choice"}} | d11798d8895bf5dc45fd0a4818129717a2df6af9863ea6a3c1e92a9c21d1cce3 | en | CC-BY-4.0 | Return the maximum of quantity for retail invoice lines where (quantity is at most 25 or unit_price is greater than 2.25), grouped by invoice_date, ordered by invoice_date ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[25,2.25],\"sql\":\"SELECT invoice_date, MAX(quantity) AS value FROM retail_lines WHERE (quantity <= ? OR unit_price > ?) GROUP BY invoice_date ORDER BY invoice_date ASC\"}","plan_2":"{\"parameters\":[25,2.25],\"sql\":\"SELECT invoice_date, MAX(quantity) AS value FROM reta... | [["2009-12-01",58],["2009-12-02",200],["2009-12-03",80],["2009-12-04",72],["2009-12-05",24],["2009-12-06",30],["2009-12-07",96],["2009-12-08",936],["2009-12-09",48],["2009-12-10",48],["2009-12-11",40],["2009-12-13",72],["2009-12-14",72],["2009-12-15",144],["2009-12-16",96],["2009-12-17",216],["2009-12-18",48],["2009-12... | online_retail_ii | train | SELECT invoice_date, MAX(quantity) AS value FROM retail_lines WHERE (quantity <= ? OR unit_price > ?) GROUP BY invoice_date ORDER BY invoice_date ASC | [25,2.25] | {"question":"Return the maximum of quantity for retail invoice lines where (quantity is at most 25 or unit_price is greater than 2.25), grouped by invoice_date, ordered by invoice_date ascending.","schema":{"retail_lines":{"country":"TEXT","invoice":"TEXT","invoice_date":"TEXT","line_id":"INTEGER","quantity":"INTEGER",... | text_to_sql_plan_selection |
single_table/ranked | sensor | dece44d5026c8b9b4ee0321c | {"plan":{"confidence":1,"label":"plan_2","probabilities":{"plan_1":0,"plan_2":1,"plan_3":0,"plan_4":0},"type":"choice"}} | 86d4149dcc50ae8253ee70bc5032c24b5be39b189fc24e897618d626f63916d9 | en | CC-BY-4.0 | Return the maximum of fs1_mean for hydraulic cycles where (vs1_mean is at most 0.54422), grouped by pump_leakage; return at most 5 groups ordered by aggregate value DESC, breaking ties by pump_leakage ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[0.54422],\"sql\":\"SELECT pump_leakage, MAX(fs1_mean) AS value FROM hydraulic_cycles WHERE (vs1_mean <= ?) GROUP BY pump_leakage ORDER BY value ASC, pump_leakage ASC LIMIT 5\"}","plan_2":"{\"parameters\":[0.54422],\"sql\":\"SELECT pump_leakage, MAX(fs1_mean) AS value FROM... | [[0,6.70812],[1,6.5301],[2,6.43777]] | hydraulic | train | SELECT pump_leakage, MAX(fs1_mean) AS value FROM hydraulic_cycles WHERE (vs1_mean <= ?) GROUP BY pump_leakage ORDER BY value DESC, pump_leakage ASC LIMIT 5 | [0.54422] | {"question":"Return the maximum of fs1_mean for hydraulic cycles where (vs1_mean is at most 0.54422), grouped by pump_leakage; return at most 5 groups ordered by aggregate value DESC, breaking ties by pump_leakage ascending.","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTEGER",... | text_to_sql_plan_selection |
single_table/and/grouped | commerce | 36a82063856ac788612f93eb | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | f0e7593e1908d4339c129ed07123bd1afe5384eab305bc920dfdcc31f31b94f9 | en | CC-BY-4.0 | Return the sum of product_duration for shopping sessions where (administrative is greater than 7 and product_duration is at most 167.5), grouped by month, ordered by month ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[7,167.5],\"sql\":\"SELECT month, SUM(product_duration) AS value FROM shopping_sessions WHERE (administrative > ? OR product_duration <= ?) GROUP BY month ORDER BY month ASC\"}","plan_2":"{\"parameters\":[7,167.5],\"sql\":\"SELECT month, COUNT(*) AS value FROM shopping_ses... | [["Aug",505.8166667],["Dec",879.24999997],["June",135.0666667],["Mar",73.21428571],["May",400.25],["Nov",757.7166667],["Oct",658.4499999],["Sep",340.56190476999996]] | online_shoppers | train | SELECT month, SUM(product_duration) AS value FROM shopping_sessions WHERE (administrative > ? AND product_duration <= ?) GROUP BY month ORDER BY month ASC | [7,167.5] | {"question":"Return the sum of product_duration for shopping sessions where (administrative is greater than 7 and product_duration is at most 167.5), grouped by month, ordered by month ascending.","schema":{"shopping_sessions":{"administrative":"INTEGER","month":"TEXT","product_duration":"REAL","product_related":"INTEG... | text_to_sql_plan_selection |
single_table/or/aggregate | commerce | 1af09ce49f20cc93f4027e6a | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | 310773fb2d684c09490624986da98d221a0b905d8aede35b40a7ef3b9f9d6f6f | en | CC-BY-4.0 | Return the sum of product_related for shopping sessions where (administrative is at most 13 or product_duration is greater than 1564.0). | {"plan":{"criteria":{"plan_1":"{\"parameters\":[13,1564.0],\"sql\":\"SELECT SUM(product_related) AS value FROM shopping_sessions WHERE (administrative <= ? AND product_duration > ?)\"}","plan_2":"{\"parameters\":[13,1564.0],\"sql\":\"SELECT COUNT(*) AS value FROM shopping_sessions WHERE (administrative <= ? OR product_... | [[389985]] | online_shoppers | train | SELECT SUM(product_related) AS value FROM shopping_sessions WHERE (administrative <= ? OR product_duration > ?) | [13,1564.0] | {"question":"Return the sum of product_related for shopping sessions where (administrative is at most 13 or product_duration is greater than 1564.0).","schema":{"shopping_sessions":{"administrative":"INTEGER","month":"TEXT","product_duration":"REAL","product_related":"INTEGER","region":"INTEGER","revenue":"INTEGER","se... | text_to_sql_plan_selection |
single_table/and/having | sensor | 4067f1488d8571e773e87685 | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 653e2d2e9db21553f88507ce5032d17fb8078d2b01838a237317e4cd180cd914 | en | CC-BY-4.0 | Return the minimum of vs1_mean for hydraulic cycles where (accumulator equals 100 and ps1_mean is at most 156.56746), grouped by pump_leakage, keeping only groups with at least 2 matching rows; return at most 5 groups ordered by aggregate value DESC, breaking ties by pump_leakage ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[100,156.56746,2],\"sql\":\"SELECT pump_leakage, MIN(vs1_mean) AS value FROM hydraulic_cycles WHERE (accumulator = ? OR ps1_mean <= ?) GROUP BY pump_leakage HAVING COUNT(*) >= ? ORDER BY value DESC, pump_leakage ASC LIMIT 5\"}","plan_2":"{\"parameters\":[100,156.56746],\"s... | [[1,0.62832],[0,0.62297]] | hydraulic | train | SELECT pump_leakage, MIN(vs1_mean) AS value FROM hydraulic_cycles WHERE (accumulator = ? AND ps1_mean <= ?) GROUP BY pump_leakage HAVING COUNT(*) >= ? ORDER BY value DESC, pump_leakage ASC LIMIT 5 | [100,156.56746,2] | {"question":"Return the minimum of vs1_mean for hydraulic cycles where (accumulator equals 100 and ps1_mean is at most 156.56746), grouped by pump_leakage, keeping only groups with at least 2 matching rows; return at most 5 groups ordered by aggregate value DESC, breaking ties by pump_leakage ascending.","schema":{"hyd... | text_to_sql_plan_selection |
single_table/ranked | commerce | cb5534479142b9f96bd8a719 | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | f2710e5ee52f741886d1793bef3b19257e65e9ea962e22781f7ee67b1cbb658d | en | CC-BY-4.0 | Return the sum of quantity for retail invoice lines where (unit_price is greater than 4.77), grouped by country; return at most 3 groups ordered by aggregate value ASC, breaking ties by country ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[4.77],\"sql\":\"SELECT country, SUM(quantity) AS value FROM retail_lines WHERE (unit_price > ?) GROUP BY country ORDER BY value DESC, country ASC LIMIT 3\"}","plan_2":"{\"parameters\":[4.77],\"sql\":\"SELECT country, AVG(quantity) AS value FROM retail_lines WHERE (unit_pr... | [["Poland",1],["Japan",2],["United Arab Emirates",2]] | online_retail_ii | train | SELECT country, SUM(quantity) AS value FROM retail_lines WHERE (unit_price > ?) GROUP BY country ORDER BY value ASC, country ASC LIMIT 3 | [4.77] | {"question":"Return the sum of quantity for retail invoice lines where (unit_price is greater than 4.77), grouped by country; return at most 3 groups ordered by aggregate value ASC, breaking ties by country ascending.","schema":{"retail_lines":{"country":"TEXT","invoice":"TEXT","invoice_date":"TEXT","line_id":"INTEGER"... | text_to_sql_plan_selection |
single_table/ranked | commerce | 1d170b2db5fde57f9535d5cd | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 442aca62b27d023514179039beff680bdc030d49a2831175e19102d5c665a988 | en | CC-BY-4.0 | Return the maximum of administrative for shopping sessions where (traffic_type equals 1), grouped by revenue; return at most 3 groups ordered by aggregate value ASC, breaking ties by revenue ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[1],\"sql\":\"SELECT revenue, MAX(administrative) AS value FROM shopping_sessions WHERE (traffic_type = ?) GROUP BY revenue ORDER BY value DESC, revenue ASC LIMIT 3\"}","plan_2":"{\"parameters\":[1],\"sql\":\"SELECT revenue, COUNT(*) AS value FROM shopping_sessions WHERE (... | [[1,17],[0,24]] | online_shoppers | train | SELECT revenue, MAX(administrative) AS value FROM shopping_sessions WHERE (traffic_type = ?) GROUP BY revenue ORDER BY value ASC, revenue ASC LIMIT 3 | [1] | {"question":"Return the maximum of administrative for shopping sessions where (traffic_type equals 1), grouped by revenue; return at most 3 groups ordered by aggregate value ASC, breaking ties by revenue ascending.","schema":{"shopping_sessions":{"administrative":"INTEGER","month":"TEXT","product_duration":"REAL","prod... | text_to_sql_plan_selection |
single_table/ranked | commerce | 4c0f2070c49a9239fc7a82f1 | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 7a6af0963b872a3c87e1305415e6d3e1620b67ef6af9169cd6bbb5e948714862 | en | CC-BY-4.0 | Return the average of quantity for retail invoice lines where (quantity is at most 1800), grouped by country; return at most 5 groups ordered by aggregate value DESC, breaking ties by country ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[1800],\"sql\":\"SELECT country, AVG(quantity) AS value FROM retail_lines WHERE (quantity <= ?) GROUP BY country ORDER BY value ASC, country ASC LIMIT 5\"}","plan_2":"{\"parameters\":[1800],\"sql\":\"SELECT country, COUNT(*) AS value FROM retail_lines WHERE (quantity <= ?)... | [["Japan",135.31578947368422],["Sweden",118.23655913978494],["Channel Islands",103.41666666666667],["Netherlands",66.23728813559322],["EIRE",66.15196078431373]] | online_retail_ii | train | SELECT country, AVG(quantity) AS value FROM retail_lines WHERE (quantity <= ?) GROUP BY country ORDER BY value DESC, country ASC LIMIT 5 | [1800] | {"question":"Return the average of quantity for retail invoice lines where (quantity is at most 1800), grouped by country; return at most 5 groups ordered by aggregate value DESC, breaking ties by country ascending.","schema":{"retail_lines":{"country":"TEXT","invoice":"TEXT","invoice_date":"TEXT","line_id":"INTEGER","... | text_to_sql_plan_selection |
single_table/or/aggregate | sensor | 4a30ef772b07e8c8b7a7c58e | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | e46201263e3582ac46845f66becd4afea0ab65b8ae54b4a88faf536766eecaed | en | CC-BY-4.0 | Return the maximum of vs1_mean for hydraulic cycles where (eps1_mean is greater than 2398.143 or fs1_mean is at most 6.68926). | {"plan":{"criteria":{"plan_1":"{\"parameters\":[2398.143,6.68926],\"sql\":\"SELECT MAX(vs1_mean) AS value FROM hydraulic_cycles WHERE (eps1_mean > ? AND fs1_mean <= ?)\"}","plan_2":"{\"parameters\":[2398.143,6.68926],\"sql\":\"SELECT COUNT(*) AS value FROM hydraulic_cycles WHERE (eps1_mean > ? OR fs1_mean <= ?)\"}","pl... | [[0.83907]] | hydraulic | train | SELECT MAX(vs1_mean) AS value FROM hydraulic_cycles WHERE (eps1_mean > ? OR fs1_mean <= ?) | [2398.143,6.68926] | {"question":"Return the maximum of vs1_mean for hydraulic cycles where (eps1_mean is greater than 2398.143 or fs1_mean is at most 6.68926).","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTEGER","eps1_mean":"REAL","fs1_mean":"REAL","ps1_mean":"REAL","ps2_mean":"REAL","pump_leakag... | text_to_sql_plan_selection |
single_table/ranked | sensor | 7404d2dc46bf06011cef5ba1 | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | f54a8423f516a4a3fcfd2656fd1457d8e0192f1ab4c29762c8fcf265943ac5e8 | en | CC-BY-4.0 | Return the maximum of eps1_mean for hydraulic cycles where (eps1_mean is at most 2480.92663), grouped by valve; return at most 3 groups ordered by aggregate value ASC, breaking ties by valve ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[2480.92663],\"sql\":\"SELECT valve, MAX(eps1_mean) AS value FROM hydraulic_cycles WHERE (eps1_mean <= ?) GROUP BY valve ORDER BY value DESC, valve ASC LIMIT 3\"}","plan_2":"{\"parameters\":[2480.92663],\"sql\":\"SELECT valve, COUNT(*) AS value FROM hydraulic_cycles WHERE ... | [[80,2480.5479],[73,2480.6025],[90,2480.91643]] | hydraulic | train | SELECT valve, MAX(eps1_mean) AS value FROM hydraulic_cycles WHERE (eps1_mean <= ?) GROUP BY valve ORDER BY value ASC, valve ASC LIMIT 3 | [2480.92663] | {"question":"Return the maximum of eps1_mean for hydraulic cycles where (eps1_mean is at most 2480.92663), grouped by valve; return at most 3 groups ordered by aggregate value ASC, breaking ties by valve ascending.","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTEGER","eps1_mean... | text_to_sql_plan_selection |
join/date/aggregate | commerce | 146be0490ed426c280fff260 | {"plan":{"confidence":1,"label":"plan_1","probabilities":{"plan_1":1,"plan_2":0,"plan_3":0,"plan_4":0},"type":"choice"}} | 80ca0abc1cef4439ef43fb765edb3304b456989a458af359ad24aa63921505b1 | en | CC-BY-4.0 | Return the maximum of l.quantity for retail lines joined to their invoices where (i.invoice_date is before '2011-05-10'). | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"2011-05-10\"],\"sql\":\"SELECT MAX(l.quantity) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (i.invoice_date < ?)\"}","plan_2":"{\"parameters\":[\"2011-05-10\"],\"sql\":\"SELECT COUNT(*) AS value FROM retail_lines l JOIN retail_invoi... | [[10000]] | online_retail_ii | train | SELECT MAX(l.quantity) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (i.invoice_date < ?) | ["2011-05-10"] | {"question":"Return the maximum of l.quantity for retail lines joined to their invoices where (i.invoice_date is before '2011-05-10').","schema":{"retail_invoices":{"country":"TEXT","customer_id":"TEXT","invoice":"TEXT","invoice_date":"TEXT"},"retail_lines":{"country":"TEXT","invoice":"TEXT","invoice_date":"TEXT","line... | text_to_sql_plan_selection |
join/distinct_invoice/or/ranked | commerce | dee4cddc3dfbec8317aab6c5 | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 19fc5f0e568b551498ab7a294301dfeee8c1dc90a25483280b62dd0d83870ae8 | en | CC-BY-4.0 | Return the number of distinct i.invoice for retail lines joined to their invoices where (i.country equals 'Austria' or l.quantity is at most 92), grouped by i.invoice_date; return at most 5 groups ordered by aggregate value DESC, breaking ties by i.invoice_date ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"Austria\",92],\"sql\":\"SELECT i.invoice_date, COUNT(DISTINCT i.invoice) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (i.country = ? AND l.quantity <= ?) GROUP BY i.invoice_date ORDER BY value DESC, i.invoice_date ASC LIMIT 5\"}","p... | [["2010-12-01",66],["2010-12-02",62],["2010-12-09",50],["2010-12-08",46],["2010-11-25",32]] | online_retail_ii | train | SELECT i.invoice_date, COUNT(DISTINCT i.invoice) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (i.country = ? OR l.quantity <= ?) GROUP BY i.invoice_date ORDER BY value DESC, i.invoice_date ASC LIMIT 5 | ["Austria",92] | {"question":"Return the number of distinct i.invoice for retail lines joined to their invoices where (i.country equals 'Austria' or l.quantity is at most 92), grouped by i.invoice_date; return at most 5 groups ordered by aggregate value DESC, breaking ties by i.invoice_date ascending.","schema":{"retail_invoices":{"cou... | text_to_sql_plan_selection |
single_table/ranked | sensor | 9515f0a2d16b39758bfff940 | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | ebfde3db19bdc270008bab3fd81fde373145a9fb03933fa66a774442e32db543 | en | CC-BY-4.0 | Return the minimum of ts1_mean for hydraulic cycles where (ps1_mean is at most 158.96089), grouped by pump_leakage; return at most 3 groups ordered by aggregate value ASC, breaking ties by pump_leakage ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[158.96089],\"sql\":\"SELECT pump_leakage, MIN(ts1_mean) AS value FROM hydraulic_cycles WHERE (ps1_mean <= ?) GROUP BY pump_leakage ORDER BY value DESC, pump_leakage ASC LIMIT 3\"}","plan_2":"{\"parameters\":[158.96089],\"sql\":\"SELECT pump_leakage, COUNT(*) AS value FROM... | [[2,44.00265],[1,44.03303],[0,44.31895]] | hydraulic | train | SELECT pump_leakage, MIN(ts1_mean) AS value FROM hydraulic_cycles WHERE (ps1_mean <= ?) GROUP BY pump_leakage ORDER BY value ASC, pump_leakage ASC LIMIT 3 | [158.96089] | {"question":"Return the minimum of ts1_mean for hydraulic cycles where (ps1_mean is at most 158.96089), grouped by pump_leakage; return at most 3 groups ordered by aggregate value ASC, breaking ties by pump_leakage ascending.","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTEGER"... | text_to_sql_plan_selection |
single_table/and/aggregate | commerce | da5470266ba26ff364f45519 | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 732ace06f813275c57851a0ae042a49f27bf18ef9f4f52c909edcde1a926991d | en | CC-BY-4.0 | Return the maximum of quantity for retail invoice lines where (country equals 'Denmark' and quantity is at most 648). | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"Denmark\",648],\"sql\":\"SELECT MAX(quantity) AS value FROM retail_lines WHERE (country = ? OR quantity <= ?)\"}","plan_2":"{\"parameters\":[\"Denmark\",648],\"sql\":\"SELECT COUNT(*) AS value FROM retail_lines WHERE (country = ? AND quantity <= ?)\"}","plan_3":"{\"para... | [[256]] | online_retail_ii | train | SELECT MAX(quantity) AS value FROM retail_lines WHERE (country = ? AND quantity <= ?) | ["Denmark",648] | {"question":"Return the maximum of quantity for retail invoice lines where (country equals 'Denmark' and quantity is at most 648).","schema":{"retail_lines":{"country":"TEXT","invoice":"TEXT","invoice_date":"TEXT","line_id":"INTEGER","quantity":"INTEGER","stock_code":"TEXT","unit_price":"REAL"}}} | text_to_sql_plan_selection |
single_table/having | commerce | bb0945f2c4e4460a929fc573 | {"plan":{"confidence":1,"label":"plan_1","probabilities":{"plan_1":1,"plan_2":0,"plan_3":0,"plan_4":0},"type":"choice"}} | 254c68eceb02da58dd9a6ccd4e889cc6df615e225758d98607557b81effa4677 | en | CC-BY-4.0 | Return the average of quantity for retail invoice lines where (quantity is greater than 229), grouped by invoice_date, keeping only groups with at least 2 matching rows; return at most 5 groups ordered by aggregate value DESC, breaking ties by invoice_date ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[229,2],\"sql\":\"SELECT invoice_date, AVG(quantity) AS value FROM retail_lines WHERE (quantity > ?) GROUP BY invoice_date HAVING COUNT(*) >= ? ORDER BY value DESC, invoice_date ASC LIMIT 5\"}","plan_2":"{\"parameters\":[229,2],\"sql\":\"SELECT invoice_date, AVG(quantity) ... | [["2010-03-23",4895.111111111111],["2010-05-18",4166.666666666667],["2010-11-04",3227.0],["2009-12-03",2026.4],["2010-06-08",2000.0]] | online_retail_ii | train | SELECT invoice_date, AVG(quantity) AS value FROM retail_lines WHERE (quantity > ?) GROUP BY invoice_date HAVING COUNT(*) >= ? ORDER BY value DESC, invoice_date ASC LIMIT 5 | [229,2] | {"question":"Return the average of quantity for retail invoice lines where (quantity is greater than 229), grouped by invoice_date, keeping only groups with at least 2 matching rows; return at most 5 groups ordered by aggregate value DESC, breaking ties by invoice_date ascending.","schema":{"retail_lines":{"country":"T... | text_to_sql_plan_selection |
single_table/grouped | commerce | 8160ffbdc1e43f0379b51b7b | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 04dfcc92eaeac29900163db352b7a4e7846475687ad542d18a0c11b24a778f2b | en | CC-BY-4.0 | Return the average of product_duration for shopping sessions where (administrative is at most 13), grouped by month, ordered by month ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[13],\"sql\":\"SELECT month, COUNT(*) AS value FROM shopping_sessions WHERE (administrative <= ?) GROUP BY month ORDER BY month ASC\"}","plan_2":"{\"parameters\":[13],\"sql\":\"SELECT month, SUM(product_duration) AS value FROM shopping_sessions WHERE (administrative <= ?) ... | [["Aug",1197.6863369469647],["Dec",1075.2321685848801],["Feb",471.0146472655815],["Jul",1143.3957348757647],["June",1189.0837300983567],["Mar",796.7433850065187],["May",946.1533415004236],["Nov",1692.948742906739],["Oct",1073.2816117096804],["Sep",1207.8628008950684]] | online_shoppers | train | SELECT month, AVG(product_duration) AS value FROM shopping_sessions WHERE (administrative <= ?) GROUP BY month ORDER BY month ASC | [13] | {"question":"Return the average of product_duration for shopping sessions where (administrative is at most 13), grouped by month, ordered by month ascending.","schema":{"shopping_sessions":{"administrative":"INTEGER","month":"TEXT","product_duration":"REAL","product_related":"INTEGER","region":"INTEGER","revenue":"INTE... | text_to_sql_plan_selection |
single_table/and/grouped | sensor | 5a66c43a46757b257f70faa2 | {"plan":{"confidence":1,"label":"plan_1","probabilities":{"plan_1":1,"plan_2":0,"plan_3":0,"plan_4":0},"type":"choice"}} | b8cf5af0e3dec0c70b97c33fa1e723d84c679d61ecc9bc4cd0fe4269bb914c82 | en | CC-BY-4.0 | Return the minimum of ps1_mean for hydraulic cycles where (pump_leakage equals 0 and ts1_mean is greater than 36.33327), grouped by valve, ordered by valve ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[0,36.33327],\"sql\":\"SELECT valve, MIN(ps1_mean) AS value FROM hydraulic_cycles WHERE (pump_leakage = ? AND ts1_mean > ?) GROUP BY valve ORDER BY valve ASC\"}","plan_2":"{\"parameters\":[0,36.33327],\"sql\":\"SELECT valve, MIN(ps1_mean) AS value FROM hydraulic_cycles WHE... | [[73,156.27905],[80,156.20046],[90,156.12875],[100,155.97478]] | hydraulic | train | SELECT valve, MIN(ps1_mean) AS value FROM hydraulic_cycles WHERE (pump_leakage = ? AND ts1_mean > ?) GROUP BY valve ORDER BY valve ASC | [0,36.33327] | {"question":"Return the minimum of ps1_mean for hydraulic cycles where (pump_leakage equals 0 and ts1_mean is greater than 36.33327), grouped by valve, ordered by valve ascending.","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTEGER","eps1_mean":"REAL","fs1_mean":"REAL","ps1_mea... | text_to_sql_plan_selection |
single_table/or/aggregate | sensor | dc5da2e06e25265552574693 | {"plan":{"confidence":1,"label":"plan_2","probabilities":{"plan_1":0,"plan_2":1,"plan_3":0,"plan_4":0},"type":"choice"}} | 96776b8943bc5660734f59da73ec343b44886c5654901e8a3e1cfc8b059687a9 | en | CC-BY-4.0 | Return the sum of ps1_mean for hydraulic cycles where (ps1_mean is greater than 158.96089 or ps2_mean is at most 107.17314). | {"plan":{"criteria":{"plan_1":"{\"parameters\":[158.96089,107.17314],\"sql\":\"SELECT SUM(ps1_mean) AS value FROM hydraulic_cycles WHERE (ps1_mean > ? AND ps2_mean <= ?)\"}","plan_2":"{\"parameters\":[158.96089,107.17314],\"sql\":\"SELECT SUM(ps1_mean) AS value FROM hydraulic_cycles WHERE (ps1_mean > ? OR ps2_mean <= ?... | [[283825.14521]] | hydraulic | train | SELECT SUM(ps1_mean) AS value FROM hydraulic_cycles WHERE (ps1_mean > ? OR ps2_mean <= ?) | [158.96089,107.17314] | {"question":"Return the sum of ps1_mean for hydraulic cycles where (ps1_mean is greater than 158.96089 or ps2_mean is at most 107.17314).","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTEGER","eps1_mean":"REAL","fs1_mean":"REAL","ps1_mean":"REAL","ps2_mean":"REAL","pump_leakage"... | text_to_sql_plan_selection |
single_table/and/aggregate | sensor | 4541715dd17d14ab0570e65b | {"plan":{"confidence":1,"label":"plan_1","probabilities":{"plan_1":1,"plan_2":0,"plan_3":0,"plan_4":0},"type":"choice"}} | 96f8642c1ce58d9226730905295ebafcdb677b9c65652b676e474a25795e4dd9 | en | CC-BY-4.0 | Return the sum of vs1_mean for hydraulic cycles where (ps1_mean is at most 158.27043 and eps1_mean is at most 2480.92663). | {"plan":{"criteria":{"plan_1":"{\"parameters\":[158.27043,2480.92663],\"sql\":\"SELECT SUM(vs1_mean) AS value FROM hydraulic_cycles WHERE (ps1_mean <= ? AND eps1_mean <= ?)\"}","plan_2":"{\"parameters\":[158.27043,2480.92663],\"sql\":\"SELECT SUM(vs1_mean) AS value FROM hydraulic_cycles WHERE (ps1_mean <= ? OR eps1_mea... | [[409.26917]] | hydraulic | train | SELECT SUM(vs1_mean) AS value FROM hydraulic_cycles WHERE (ps1_mean <= ? AND eps1_mean <= ?) | [158.27043,2480.92663] | {"question":"Return the sum of vs1_mean for hydraulic cycles where (ps1_mean is at most 158.27043 and eps1_mean is at most 2480.92663).","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTEGER","eps1_mean":"REAL","fs1_mean":"REAL","ps1_mean":"REAL","ps2_mean":"REAL","pump_leakage":"... | text_to_sql_plan_selection |
single_table/or/having | commerce | 0bb1ec1a27d78e0b16e75c04 | {"plan":{"confidence":1,"label":"plan_4","probabilities":{"plan_1":0,"plan_2":0,"plan_3":0,"plan_4":1},"type":"choice"}} | 8134ab8b0ff21fa0deb9f3dc79fbbbb428f2e4eb65957f38194612dd6fd151ff | en | CC-BY-4.0 | Return the sum of product_related for shopping sessions where (month equals 'Dec' or traffic_type equals 14), grouped by visitor_type, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by visitor_type ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"Dec\",14,10],\"sql\":\"SELECT visitor_type, SUM(product_related) AS value FROM shopping_sessions WHERE (month = ? AND traffic_type = ?) GROUP BY visitor_type HAVING COUNT(*) >= ? ORDER BY value ASC, visitor_type ASC LIMIT 3\"}","plan_2":"{\"parameters\":[\"Dec\",14,10],... | [["Other",608],["New_Visitor",5633],["Returning_Visitor",43140]] | online_shoppers | train | SELECT visitor_type, SUM(product_related) AS value FROM shopping_sessions WHERE (month = ? OR traffic_type = ?) GROUP BY visitor_type HAVING COUNT(*) >= ? ORDER BY value ASC, visitor_type ASC LIMIT 3 | ["Dec",14,10] | {"question":"Return the sum of product_related for shopping sessions where (month equals 'Dec' or traffic_type equals 14), grouped by visitor_type, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by visitor_type ascending.","schema":{"shopping_se... | text_to_sql_plan_selection |
join/null/or/having | commerce | ec0a5c4924a87c4be032b465 | {"plan":{"confidence":1,"label":"plan_2","probabilities":{"plan_1":0,"plan_2":1,"plan_3":0,"plan_4":0},"type":"choice"}} | 524eb421d4e432a8cd1d0bb99294dbe45f305c45098651502da272e0db532ff5 | en | CC-BY-4.0 | Return the maximum of l.quantity for retail lines joined to their invoices where (i.country equals 'Austria' or i.customer_id is present), grouped by i.invoice_date, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by i.invoice_date ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"Austria\",10],\"sql\":\"SELECT i.invoice_date, MAX(l.quantity) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (i.country = ? AND i.customer_id IS NOT NULL) GROUP BY i.invoice_date HAVING COUNT(*) >= ? ORDER BY value ASC, i.invoice_dat... | [["2010-08-01",12],["2011-02-09",12],["2010-01-26",24]] | online_retail_ii | train | SELECT i.invoice_date, MAX(l.quantity) AS value FROM retail_lines l JOIN retail_invoices i ON l.invoice = i.invoice WHERE (i.country = ? OR i.customer_id IS NOT NULL) GROUP BY i.invoice_date HAVING COUNT(*) >= ? ORDER BY value ASC, i.invoice_date ASC LIMIT 3 | ["Austria",10] | {"question":"Return the maximum of l.quantity for retail lines joined to their invoices where (i.country equals 'Austria' or i.customer_id is present), grouped by i.invoice_date, keeping only groups with at least 10 matching rows; return at most 3 groups ordered by aggregate value ASC, breaking ties by i.invoice_date a... | text_to_sql_plan_selection |
single_table/or/ranked | sensor | e5af4330a4a90a5dc7eb6ce1 | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | df4e13f665a8134512e4e75518f3cb65d2019b2ff16111b1d3e01030014c3f83 | en | CC-BY-4.0 | Return the maximum of ps1_mean for hydraulic cycles where (accumulator equals 90 or eps1_mean is greater than 2544.76), grouped by cooler; return at most 3 groups ordered by aggregate value ASC, breaking ties by cooler ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[90,2544.76],\"sql\":\"SELECT cooler, MAX(ps1_mean) AS value FROM hydraulic_cycles WHERE (accumulator = ? AND eps1_mean > ?) GROUP BY cooler ORDER BY value ASC, cooler ASC LIMIT 3\"}","plan_2":"{\"parameters\":[90,2544.76],\"sql\":\"SELECT cooler, MAX(ps1_mean) AS value FR... | [[20,159.25179],[100,161.40794],[3,180.92271]] | hydraulic | train | SELECT cooler, MAX(ps1_mean) AS value FROM hydraulic_cycles WHERE (accumulator = ? OR eps1_mean > ?) GROUP BY cooler ORDER BY value ASC, cooler ASC LIMIT 3 | [90,2544.76] | {"question":"Return the maximum of ps1_mean for hydraulic cycles where (accumulator equals 90 or eps1_mean is greater than 2544.76), grouped by cooler; return at most 3 groups ordered by aggregate value ASC, breaking ties by cooler ascending.","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cy... | text_to_sql_plan_selection |
single_table/or/grouped | commerce | ad543f292d5dfbc70588558d | {"plan":{"confidence":1,"label":"plan_1","probabilities":{"plan_1":1,"plan_2":0,"plan_3":0,"plan_4":0},"type":"choice"}} | fa94b97c824a52275fb07442f4f70f61862072f2696fbae2aff50edd418f6523 | en | CC-BY-4.0 | Return the minimum of unit_price for retail invoice lines where (country equals 'Cyprus' or unit_price is at most 8.5), grouped by country, ordered by country ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[\"Cyprus\",8.5],\"sql\":\"SELECT country, MIN(unit_price) AS value FROM retail_lines WHERE (country = ? OR unit_price <= ?) GROUP BY country ORDER BY country ASC\"}","plan_2":"{\"parameters\":[\"Cyprus\",8.5],\"sql\":\"SELECT country, MIN(unit_price) AS value FROM retail_... | [["Australia",0.85],["Austria",0.55],["Bahrain",0.85],["Belgium",0.32],["Canada",0.83],["Channel Islands",1.25],["Cyprus",0.34],["Denmark",0.72],["EIRE",0.16],["Finland",0.29],["France",0.19],["Germany",0.04],["Israel",1.25],["Italy",0.85],["Japan",0.36],["Netherlands",0.21],["Norway",1.25],["Poland",1.25],["Portugal",... | online_retail_ii | train | SELECT country, MIN(unit_price) AS value FROM retail_lines WHERE (country = ? OR unit_price <= ?) GROUP BY country ORDER BY country ASC | ["Cyprus",8.5] | {"question":"Return the minimum of unit_price for retail invoice lines where (country equals 'Cyprus' or unit_price is at most 8.5), grouped by country, ordered by country ascending.","schema":{"retail_lines":{"country":"TEXT","invoice":"TEXT","invoice_date":"TEXT","line_id":"INTEGER","quantity":"INTEGER","stock_code":... | text_to_sql_plan_selection |
single_table/or/grouped | commerce | e550a493027680677628f4a8 | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 2213e2eafabed39b048b6e5863bc5008908568a9fe113d026377c6f9ddb07396 | en | CC-BY-4.0 | Return the minimum of product_duration for shopping sessions where (administrative is greater than 23 or product_duration is greater than 167.5), grouped by visitor_type, ordered by visitor_type ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[23,167.5],\"sql\":\"SELECT visitor_type, MIN(product_duration) AS value FROM shopping_sessions WHERE (administrative > ? AND product_duration > ?) GROUP BY visitor_type ORDER BY visitor_type ASC\"}","plan_2":"{\"parameters\":[23,167.5],\"sql\":\"SELECT visitor_type, COUNT... | [["New_Visitor",168.0],["Other",192.875],["Returning_Visitor",167.8333333]] | online_shoppers | train | SELECT visitor_type, MIN(product_duration) AS value FROM shopping_sessions WHERE (administrative > ? OR product_duration > ?) GROUP BY visitor_type ORDER BY visitor_type ASC | [23,167.5] | {"question":"Return the minimum of product_duration for shopping sessions where (administrative is greater than 23 or product_duration is greater than 167.5), grouped by visitor_type, ordered by visitor_type ascending.","schema":{"shopping_sessions":{"administrative":"INTEGER","month":"TEXT","product_duration":"REAL","... | text_to_sql_plan_selection |
single_table/and/aggregate | sensor | 50f5cc39fe6749549c1f744c | {"plan":{"confidence":1,"label":"plan_2","probabilities":{"plan_1":0,"plan_2":1,"plan_3":0,"plan_4":0},"type":"choice"}} | b362593119581e877d7e93e42549650fc4f5adbae46d86af692fb6d1924c54e4 | en | CC-BY-4.0 | Return the minimum of fs1_mean for hydraulic cycles where (ps2_mean is greater than 105.7255 and ts1_mean is at most 35.56605). | {"plan":{"criteria":{"plan_1":"{\"parameters\":[105.7255,35.56605],\"sql\":\"SELECT MIN(fs1_mean) AS value FROM hydraulic_cycles WHERE (ps2_mean > ? OR ts1_mean <= ?)\"}","plan_2":"{\"parameters\":[105.7255,35.56605],\"sql\":\"SELECT MIN(fs1_mean) AS value FROM hydraulic_cycles WHERE (ps2_mean > ? AND ts1_mean <= ?)\"}... | [[6.39587]] | hydraulic | train | SELECT MIN(fs1_mean) AS value FROM hydraulic_cycles WHERE (ps2_mean > ? AND ts1_mean <= ?) | [105.7255,35.56605] | {"question":"Return the minimum of fs1_mean for hydraulic cycles where (ps2_mean is greater than 105.7255 and ts1_mean is at most 35.56605).","schema":{"hydraulic_cycles":{"accumulator":"INTEGER","cooler":"INTEGER","cycle_id":"INTEGER","eps1_mean":"REAL","fs1_mean":"REAL","ps1_mean":"REAL","ps2_mean":"REAL","pump_leaka... | text_to_sql_plan_selection |
single_table/and/grouped | commerce | 2b9738b2b01de743fd52b0fa | {"plan":{"confidence":1,"label":"plan_3","probabilities":{"plan_1":0,"plan_2":0,"plan_3":1,"plan_4":0},"type":"choice"}} | 13e8f56a91d70e6941d646d2dd2e39f7401d50155b3d45468207f3c25e79f1df | en | CC-BY-4.0 | Return the maximum of product_related for shopping sessions where (weekend equals 1 and region equals 2), grouped by visitor_type, ordered by visitor_type ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[1,2],\"sql\":\"SELECT visitor_type, MAX(product_related) AS value FROM shopping_sessions WHERE (weekend = ? OR region = ?) GROUP BY visitor_type ORDER BY visitor_type ASC\"}","plan_2":"{\"parameters\":[1,2],\"sql\":\"SELECT visitor_type, COUNT(*) AS value FROM shopping_se... | [["New_Visitor",53],["Returning_Visitor",374]] | online_shoppers | train | SELECT visitor_type, MAX(product_related) AS value FROM shopping_sessions WHERE (weekend = ? AND region = ?) GROUP BY visitor_type ORDER BY visitor_type ASC | [1,2] | {"question":"Return the maximum of product_related for shopping sessions where (weekend equals 1 and region equals 2), grouped by visitor_type, ordered by visitor_type ascending.","schema":{"shopping_sessions":{"administrative":"INTEGER","month":"TEXT","product_duration":"REAL","product_related":"INTEGER","region":"INT... | text_to_sql_plan_selection |
single_table/date/or/ranked | commerce | b8a138f9ebc16bf378fdf466 | {"plan":{"confidence":1,"label":"plan_2","probabilities":{"plan_1":0,"plan_2":1,"plan_3":0,"plan_4":0},"type":"choice"}} | 0d778da95f9161bdff8bc732ee544e8bd59e8f5618186e3df2c891e7b6359d38 | en | CC-BY-4.0 | Return the average of quantity for retail invoice lines where (quantity is greater than 1800 or invoice_date is on or after '2010-12-02'), grouped by invoice_date; return at most 5 groups ordered by aggregate value DESC, breaking ties by invoice_date ascending. | {"plan":{"criteria":{"plan_1":"{\"parameters\":[1800,\"2010-12-02\"],\"sql\":\"SELECT invoice_date, AVG(quantity) AS value FROM retail_lines WHERE (quantity > ? AND invoice_date >= ?) GROUP BY invoice_date ORDER BY value DESC, invoice_date ASC LIMIT 5\"}","plan_2":"{\"parameters\":[1800,\"2010-12-02\"],\"sql\":\"SELECT... | [["2010-03-23",10000.0],["2010-11-04",4784.0],["2009-12-03",4380.0],["2010-09-03",4336.0],["2010-05-18",4166.666666666667]] | online_retail_ii | train | SELECT invoice_date, AVG(quantity) AS value FROM retail_lines WHERE (quantity > ? OR invoice_date >= ?) GROUP BY invoice_date ORDER BY value DESC, invoice_date ASC LIMIT 5 | [1800,"2010-12-02"] | {"question":"Return the average of quantity for retail invoice lines where (quantity is greater than 1800 or invoice_date is on or after '2010-12-02'), grouped by invoice_date; return at most 5 groups ordered by aggregate value DESC, breaking ties by invoice_date ascending.","schema":{"retail_lines":{"country":"TEXT","... | text_to_sql_plan_selection |
Text2SQL-Decisions v0.3
28,081 English-only examples across two separate configurations. Both are template-generated, execution-validated drafts, not human-reviewed benchmarks. No model has been fine-tuned as part of this release.
| Configuration | Rows | Task | License |
|---|---|---|---|
default |
25,000 | Four-candidate SQL plan selection on public sensor and e-commerce data | CC BY 4.0 |
meter |
3,081 | Bounded meter planning decisions, including conversational context | CC0-1.0 |
The configurations have different supervision contracts. Load them explicitly and adapt each training builder; do not concatenate their rows without a contract-aware conversion. The default configuration is unchanged from v0.2.
Synthetic meter configuration
Covers usage totals, rankings, period comparisons, daily anomalies, stale reporting, measured spike contributors, summaries, and conversational follow-ups. The synthetic fixture has 15 meters and 33,439 cumulative readings, a frozen Asia/Bangkok clock, and explicit missing/reset/invalid interval cases. Explanations identify measured contributors, not proven physical causes.
| Split | Rows |
|---|---|
| train | 1,842 |
| dev | 445 |
| calibration | 408 |
| test | 386 |
All 3,081 gold decisions round-trip through the planner; 3,060 executable plans were checked against PostgreSQL and 21 require clarification. Splits keep 223 semantic families separate. Usage has an independent raw-reading oracle; other execution evidence is not independent human review. Templates and the shared fixture limit generalization claims.
from datasets import load_dataset
meter = load_dataset("Chulinz/Text2SQL-Decisions", "meter")
Only state and questions are inputs; decisions supplies supervision. See meter documentation, validation report, and portable fixture instructions. Meter examples and original synthetic fixture are CC0 under meter/LICENSE; the root LICENSE and UCI attribution below apply to the default configuration.
Default configuration (unchanged v0.2)
25,000 English-only text-to-SQL plan-selection examples, grounded in public hydraulic sensor and e-commerce data. Every example has a question, schema, four candidate SQL plans, a gold choice, parameterized reference SQL and its result. The included SQLite database makes the queries executable.
This is an execution-validated, template-generated dataset draft. It is not a human-authored benchmark or evidence of production text-to-SQL performance. The initial bilingual v0.1 remains in repository history; this version replaces the main splits with English-only examples and a new grouped split assignment.
| Split | Examples | Purpose |
|---|---|---|
| train | 20,000 | Parameter fitting |
| dev | 2,000 | Development and model selection |
| calibration | 1,000 | Probability calibration after fitting |
| test | 2,000 | Held-out evaluation |
These are 25,000 distinct SQL/parameter pairs, not translated or paraphrased copies counted as additional examples. They still share deterministic grammar templates and underlying databases; row count is not the number of independently authored intents.
Supported decisions
Questions cover COUNT, SUM, AVG, MIN and MAX; single and multiple AND/OR predicates; ISO date comparisons; actual NULL values; GROUP BY and HAVING; ranked groups with explicit tie-breaking; and a two-table invoice/line join, including distinct invoice counts versus line counts. Each split includes these major features. Exact per-source/category counts and integrity checks are in validation_report.json.
Candidate errors include wrong aggregation or metric, missing/reversed predicates, wrong AND/OR, invoice-versus-line counting, missing HAVING, and wrong grouping/order/limit. Candidates are unique and prepare in SQLite; their results differ from the gold result according to the independent Python evaluator. No artificial numeric answer offsets are used. Cases without enough such candidates are skipped. This selection favors distinguishable cases and is a limitation when evaluating ambiguity or empty results.
Load and execute
import json
import sqlite3
from datasets import load_dataset
from huggingface_hub import hf_hub_download
data = load_dataset("Chulinz/Text2SQL-Decisions")
row = data["train"][0]
state = json.loads(row["state"])
questions = json.loads(row["questions"])
gold = json.loads(row["gold"])
path = hf_hub_download("Chulinz/Text2SQL-Decisions", "database/source.sqlite", repo_type="dataset")
with sqlite3.connect(path) as connection:
result = connection.execute(row["sql"], json.loads(row["sql_parameters"])).fetchall()
For decision-model training, only state and questions are model input; gold supplies supervision. Do not feed results, reference SQL, family IDs or other label-bearing metadata as input. The source schema itself can include observed outcome columns because the task is querying a database, not predicting those outcomes. Training-library compatibility must be checked with that library's dataset builder before a full run.
Fields
All fields are strings, with structured values JSON-encoded where noted:
query: English question.state: JSON object with question and relevant table schema.questions: JSON choice question, instructions and four candidate SQL/parameter plans.gold: JSON label and one-hot supervision. Confidence 1 describes the supervised target, not a calibrated prediction.sql,sql_parameters,result: reference SQL and JSON-encoded parameters/result.id,family_id,split: identity and structural partition.source,domain,language,task,license,category: provenance and task metadata.categoryis a slash-separated set of query-feature tags.
Input state is at most 2,600 UTF-8 bytes; state/questions fit a 32,000-byte budget. The format provides a four-way SQL-plan decision, not separately labeled table/column/filter questions for every planning stage.
Source database
| Table | Rows | Meaning |
|---|---|---|
hydraulic_cycles |
2,205 | Six measured sensor means per 60-second cycle and source component-condition annotations |
shopping_sessions |
12,330 | Selected recorded-session columns including observed purchase outcome |
retail_lines |
27,035 | Lines from eligible positive, non-cancelled 2-6-line invoices |
retail_invoices |
7,019 | Source invoice country, date and nullable pseudonymous customer identifier |
The retail subset retains 620 invoices whose customer identifier is genuinely missing. No NULLs are fabricated. Excel dates are normalized to ISO YYYY-MM-DD, covering 2009-12-01 through 2011-12-09; time of day is discarded. Invoice keys retain a worksheet prefix to distinguish annual records. Customer identifiers are the public source's pseudonymous values, not names or contact details.
Retail invoices with invalid/nonpositive prices or quantities, fractional quantities or more than six lines were excluded in full. Prices are rounded HALF_UP to pennies. Sensor means are rounded to five decimal places and do not preserve waveform/frequency information. No claims of representativeness of all retail transactions or unseen machines are made. sources.json records source URLs, attribution, checksums and normalization details. TEP, Olist and BANKING77 are not included.
Construction and evaluation limits
SQL templates produce the natural-language question and reference plan. Every gold query is executed and checked against an independent Python calculation, including NULL, empty-set, filtering, grouping, joins and tie-order semantics. Distractors prepare successfully and differ in expected result. Tests cover the compiler and independent evaluator. No LLM is called to generate questions or labels.
Structural families exclude literal values and remain wholly within one split. Selection balances available source/category groups within each assigned split and meets the stated quotas. The same source databases are shared across all splits. This is a query-family holdout, not an unseen-database, unseen-machine or chronological holdout. Repeated language templates and near-related query structures remain. Do not interpret execution validation as comprehensive human semantic review.
Unconstrained SQL generation, arbitrary joins, subqueries, window functions, free-form language diversity and deployed-application behavior are outside this release's validated scope. No model has been fine-tuned as part of dataset creation. Use per-source and per-category metrics, keep the test set out of tuning, and distinguish supplied-plan selection from end-to-end text-to-SQL accuracy.
License and credit
The adapted dataset and documentation are distributed under CC BY 4.0, matching the license declared by UCI for all three sources. Attribute the original authors and this adaptation, link the license and describe further changes. See LICENSE; the original authors do not endorse this work.
- Helwig, N., Pignanelli, E., and Schuetze, A. (2015). Condition monitoring of hydraulic systems. UCI Machine Learning Repository. 10.24432/C5CW21.
- Chen, D. (2012). Online Retail II. UCI Machine Learning Repository. 10.24432/C5CG6D.
- Sakar, C., and Kastro, Y. (2018). Online Shoppers Purchasing Intention Dataset. UCI Machine Learning Repository. 10.24432/C5F88Q.
Adaptation: Chulinz, Text2SQL-Decisions, 2026. Modifications include source filtering, normalization, sensor summaries, English SQL-question templates, candidate plans, exact supervision and grouped splits. Base-model licenses are separate.
- Downloads last month
- 67