1sf/bird-sql-train-with-schema huggingface dataset:
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: What are the countries that belong to Africa?
Evidence: country is nation name which refers to n_name; Africa is region name refers to r_name = 'Africa'
SQL: SELECT T2.n_name FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey WHERE T1.r_name = 'Africa'
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: Which region has the lowest number of countries?
Evidence: region refers to has r_name; the lowest number of countries refers to min(count(n_name))
SQL: SELECT T.r_name FROM ( SELECT T1.r_name, COUNT(T2.n_name) AS num FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey GROUP BY T1.r_name ) AS T ORDER BY T.num LIMIT 1
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: How many customers from the furniture segments come from Iraq?
Evidence: furniture segment refers to c_mktsegment = 'FURNITURE'; Iraq refers to n_name = 'Iraq'
SQL: SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'FURNITURE' AND T2.n_name = 'IRAQ'
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: What is the name of the customer number 93697 with the total order price of 191918.92?
Evidence: customer name refers to c_name; number 93697 refers to o_custkey = 93697; total order price of 191918.92 refers to o_totalprice = 191918.92
SQL: SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice = 191918.92 AND T1.o_custkey = 93697
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: Which nation and region does the Customer#000000008 come from?
Evidence: nation refers to n_name; region refers to r_name; Customer#000000008 refers to c_name = 'Customer#000000008'
SQL: SELECT T1.n_name, T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.c_name = 'Customer#000000008'
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: What is the delivery time and the clerk of order number 6?
Evidence: delivery time = subtract(l_receiptdate, l_commitdate); clerk refers to o_clerk; order number 6 refers to o_orderkey = 6
SQL: SELECT JULIANDAY(T2.l_receiptdate) - JULIANDAY(T2.l_commitdate), T1.o_clerk FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderkey = 6
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: How many Japanese suppliers have their accounts in debt?
Evidence: Japanese refers to n_name = 'Japan'; have accounts in debt refers to s_acctbal < 0
SQL: SELECT COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 AND T2.n_name = 'JAPAN'
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: Which customer is the most in debt?
Evidence: customer refers to c_name; the most in debt refers to max(c_acctbal)
SQL: SELECT c_name FROM customer WHERE c_acctbal = ( SELECT MIN(c_acctbal) FROM customer )
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: List all the dates of the urgent orders.
Evidence: date refers to o_orderdate; urgent order refers to o_orderpriority = '1-URGENT'
SQL: SELECT o_orderdate FROM orders WHERE o_orderpriority = '1-URGENT'
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: How many of the items are instructed to be delivered in person?
Evidence: instructed to be delivered in person refers to l_shipinstruct = 'DELIVER IN PERSON'
SQL: SELECT COUNT(l_linenumber) FROM lineitem WHERE l_shipinstruct = 'DELIVER IN PERSON'
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: What is the largest supplier's account balance?
Evidence: the largest supplier's account balance refers to max(s_acctbal)
SQL: SELECT MAX(s_acctbal) FROM supplier
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: How many part supplies are close to being out of stock?
Evidence: close to being out of stock refers to ps_availqty < 10
SQL: SELECT COUNT(ps_suppkey) FROM partsupp WHERE ps_availqty < 10
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: List all the nations in Europe.
Evidence: nation refers to n_name; Europe refers to r_name = 'EUROPE'
SQL: SELECT T2.n_name FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey WHERE T1.r_name = 'EUROPE'
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: What is the supply cost for the part "violet olive rose ivory sandy"?
Evidence: supply cost refers to ps_supplycost; part "violet olive rose ivory sandy" refers to p_name = 'violet olive rose ivory sandy'
SQL: SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_name = 'violet olive rose ivory sandy'
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: List all the customers' phone numbers from Ethiopia.
Evidence: phone number refers to c_phone; Ethiopia refers to n_name = 'Ethiopia'
SQL: SELECT T1.c_phone FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'Ethiopia'
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: What is the total price of all orders from the customer with the phone number "627-220-3983"?
Evidence: total price = sum(o_totalprice); phone number "627-220-3983" refers to c_phone = '627-220-3983'
SQL: SELECT SUM(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_phone = '627-220-3983'
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: What are the shipping methods for the orders on 12/31/1994?
Evidence: shipping method refers to l_shipmode; order on 12/31/1994 refers to o_orderdate = '1994-12-31'
SQL: SELECT DISTINCT T2.l_shipmode FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderdate = '1994-12-31'
Database: retails
Tables: customer, lineitem, nation, orders, part, partsupp, region, supplier
Columns (table index, column name): -1, *, 0, c_custkey, 0, c_mktsegment, 0, c_nationkey, 0, c_name, 0, c_address, 0, c_phone, 0, c_acctbal, 0, c_comment, 1, l_shipdate, 1, l_orderkey, 1, l_discount, 1, l_extendedprice, 1, l_suppkey, 1, l_quantity, 1, l_returnflag, 1, l_partkey, 1, l_linestatus, 1, l_tax, 1, l_commitdate, 1, l_receiptdate, 1, l_shipmode, 1, l_linenumber, 1, l_shipinstruct, 1, l_comment, 2, n_nationkey, 2, n_name, 2, n_regionkey, 2, n_comment, 3, o_orderdate, 3, o_orderkey, 3, o_custkey, 3, o_orderpriority, 3, o_shippriority, 3, o_clerk, 3, o_orderstatus, 3, o_totalprice, 3, o_comment, 4, p_partkey, 4, p_type, 4, p_size, 4, p_brand, 4, p_name, 4, p_container, 4, p_mfgr, 4, p_retailprice, 4, p_comment, 5, ps_partkey, 5, ps_suppkey, 5, ps_supplycost, 5, ps_availqty, 5, ps_comment, 6, r_regionkey, 6, r_name, 6, r_comment, 7, s_suppkey, 7, s_nationkey, 7, s_comment, 7, s_name, 7, s_address, 7, s_phone, 7, s_acctbal
Question: What is the account balance of the supplier with the most parts?
Evidence: account balance refers to s_acctbal; the most parts refers to max(count(ps_suppkey))
SQL: SELECT T.s_acctbal FROM ( SELECT T1.s_acctbal, COUNT(T2.ps_suppkey) AS num FROM supplier AS T1 INNER JOIN partsupp AS T2 ON T1.s_suppkey = T2.ps_suppkey GROUP BY T1.s_suppkey ) AS T ORDER BY T.num DESC LIMIT 1