db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
retails
select l_linenumber from lineitem where l_discount = 0.1 limit 3
Question: please list any three line item numbers that have 10% off. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commi...
please list any three line item numbers that have 10% off.
retails
select count(l_linenumber) from lineitem where l_quantity > 40 and l_shipmode = 'air'
Question: how many of the line items that have a quantity greater than 40 have been shipped by air? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partke...
how many of the line items that have a quantity greater than 40 have been shipped by air?
retails
select iif(sum(iif(l_shipmode = 'rail', 1, 0)) - sum(iif(l_shipmode = 'mail', 1, 0)), 'rail', 'mail') as result from lineitem where l_shipinstruct = 'deliver in person'
Question: which ship mode has more 'deliver in person' instructions, rail or mail? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, ...
which ship mode has more 'deliver in person' instructions, rail or mail?
retails
select o_totalprice, o_orderpriority from orders where o_orderkey = 33
Question: what is the total price and the order priority of order number 33? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax,...
what is the total price and the order priority of order number 33?
retails
select count(o_orderkey) as countorders from orders where strftime('%y', o_orderdate) = '1998' and o_totalprice < 950
Question: how many orders in 1998 had a total price under 950? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate,...
how many orders in 1998 had a total price under 950?
retails
select c_name from customer where c_acctbal < 0 limit 3
Question: please list any three customers with debt. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_receipt...
please list any three customers with debt.
retails
select l_extendedprice * (1 - l_discount) from lineitem where l_linenumber = 1
Question: what is the discounted price of line item number 1? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, ...
what is the discounted price of line item number 1?
retails
select sum(iif(l_returnflag = 'a', 1, 0)) - sum(iif(l_returnflag = 'n', 1, 0)) as diff from lineitem where l_extendedprice < 16947.7
Question: what is the difference between the number of returned items and not returned items with the full price of under 16947.7? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_q...
what is the difference between the number of returned items and not returned items with the full price of under 16947.7?
retails
select t2.ps_supplycost from part as t1 inner join partsupp as t2 on t1.p_partkey = t2.ps_partkey where t1.p_type = 'large plated tin'
Question: what is the supply cost of large plated tin? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_recei...
what is the supply cost of large plated tin?
retails
select t1.p_name from part as t1 inner join partsupp as t2 on t1.p_partkey = t2.ps_partkey where t2.ps_availqty > 9998 limit 3
Question: please name any three parts that have an available quantity of more than 9998. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linest...
please name any three parts that have an available quantity of more than 9998.
retails
select t1.p_name from part as t1 inner join partsupp as t2 on t1.p_partkey = t2.ps_partkey where t2.ps_supplycost < 10 and t1.p_container = 'wrap bag' limit 2
Question: please list any two parts that come with the wrap bag container and have a supply cost of under 10. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag...
please list any two parts that come with the wrap bag container and have a supply cost of under 10.
retails
select t2.n_name from supplier as t1 inner join nation as t2 on t1.s_nationkey = t2.n_nationkey where t1.s_suppkey = 1
Question: what is the nationality of supplier number 1? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_rece...
what is the nationality of supplier number 1?
retails
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'
Question: what are the countries that belong to africa? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_rece...
what are the countries that belong to africa?
retails
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
Question: which region has the lowest number of countries? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_r...
which region has the lowest number of countries?
retails
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'
Question: how many customers from the furniture segments come from iraq? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_c...
how many customers from the furniture segments come from iraq?
retails
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
Question: what is the name of the customer number 93697 with the total order price of 191918.92? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, ...
what is the name of the customer number 93697 with the total order price of 191918.92?
retails
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'
Question: which nation and region does the customer#000000008 come from? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_c...
which nation and region does the customer#000000008 come from?
retails
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
Question: what is the delivery time and the clerk of order number 6? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commi...
what is the delivery time and the clerk of order number 6?
retails
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'
Question: how many japanese suppliers have their accounts in debt? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitd...
how many japanese suppliers have their accounts in debt?
retails
select c_name from customer where c_acctbal = ( select min(c_acctbal) from customer )
Question: which customer is the most in debt? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_receiptdate, l...
which customer is the most in debt?
retails
select o_orderdate from orders where o_orderpriority = '1-urgent'
Question: list all the dates of the urgent orders. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_receiptda...
list all the dates of the urgent orders.
retails
select count(l_linenumber) from lineitem where l_shipinstruct = 'deliver in person'
Question: how many of the items are instructed to be delivered in person? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_...
how many of the items are instructed to be delivered in person?
retails
select max(s_acctbal) from supplier
Question: what is the largest supplier's account balance? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_re...
what is the largest supplier's account balance?
retails
select count(ps_suppkey) from partsupp where ps_availqty < 10
Question: how many part supplies are close to being out of stock? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitda...
how many part supplies are close to being out of stock?
retails
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'
Question: list all the nations in europe. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_receiptdate, l_shi...
list all the nations in europe.
retails
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'
Question: what is the supply cost for the part 'violet olive rose ivory sandy'? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_t...
what is the supply cost for the part 'violet olive rose ivory sandy'?
retails
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'
Question: list all the customers' phone numbers from ethiopia. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate,...
list all the customers' phone numbers from ethiopia.
retails
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'
Question: what is the total price of all orders from the customer with the phone number '627-220-3983'? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_pa...
what is the total price of all orders from the customer with the phone number '627-220-3983'?
retails
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'
Question: what are the shipping methods for the orders on 12/31/1994? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_comm...
what are the shipping methods for the orders on 12/31/1994?
retails
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
Question: what is the account balance of the supplier with the most parts? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l...
what is the account balance of the supplier with the most parts?
retails
select t2.n_name from supplier as t1 inner join nation as t2 on t1.s_nationkey = t2.n_nationkey where t1.s_acctbal = 4393.04
Question: which nation does the supplier with the account balance of '4393.04' belong to? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_lines...
which nation does the supplier with the account balance of '4393.04' belong to?
retails
select t.r_name from ( select t3.r_name, count(t2.c_custkey) as num 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 group by t3.r_name ) as t order by t.num desc limit 1
Question: what is the region with the most customers? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_receip...
what is the region with the most customers?
retails
select t2.c_phone from orders as t1 inner join customer as t2 on t1.o_custkey = t2.c_custkey where t1.o_totalprice > 300000
Question: list the phone number of the customer who placed orders with a total price of more than $300,000. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, ...
list the phone number of the customer who placed orders with a total price of more than $300,000.
retails
select t1.o_clerk from orders as t1 inner join lineitem as t2 on t1.o_orderkey = t2.l_orderkey where t2.l_shipmode = 'mail'
Question: what are the clerks of orders with line items shipped by mail? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_c...
what are the clerks of orders with line items shipped by mail?
retails
select t2.n_name from supplier as t1 inner join nation as t2 on t1.s_nationkey = t2.n_nationkey order by t1.s_acctbal limit 1
Question: what are the top 5 nations of suppliers with the lowest account balance? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, ...
what are the top 5 nations of suppliers with the lowest account balance?
retails
select t2.s_address from partsupp as t1 inner join supplier as t2 on t1.ps_suppkey = t2.s_suppkey inner join part as t3 on t1.ps_partkey = t3.p_partkey order by t3.p_size desc limit 1
Question: list all the addresses for the suppliers of the biggest parts. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_c...
list all the addresses for the suppliers of the biggest parts.
retails
select t3.p_name, t4.s_name from partsupp as t1 inner join lineitem as t2 on t1.ps_suppkey = t2.l_suppkey inner join part as t3 on t1.ps_partkey = t3.p_partkey inner join supplier as t4 on t1.ps_suppkey = t4.s_suppkey order by t2.l_extendedprice * (1 - t2.l_discount) - t1.ps_supplycost * t2.l_quantity desc limit 1
Question: which part and supplier have the most profit? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_rece...
which part and supplier have the most profit?
retails
select cast(sum(iif(t1.r_name = 'asia', 1, 0)) as real) * 100 / count(t1.r_regionkey) from region as t1 inner join nation as t2 on t1.r_regionkey = t2.n_regionkey inner join supplier as t3 on t2.n_nationkey = t3.s_nationkey
Question: what proportion of suppliers are from asia? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_receip...
what proportion of suppliers are from asia?
retails
select o_totalprice from orders where o_orderkey = 32
Question: please indicate the total price of order key 32. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_r...
please indicate the total price of order key 32.
retails
select count(l_orderkey) from lineitem where l_discount = 0
Question: how many order keys are not applied for the discount? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate...
how many order keys are not applied for the discount?
retails
select l_linenumber from lineitem where strftime('%y', l_shipdate) < 1997 and l_shipmode = 'truck'
Question: list line items shipped by truck with delivery time before 1997. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l...
list line items shipped by truck with delivery time before 1997.
retails
select l_linenumber from lineitem where strftime('%y', l_shipdate) < 1997 and l_shipmode = 'truck'
Question: how many line items were returned in 1998? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_receipt...
how many line items were returned in 1998?
retails
select l_linenumber from lineitem where l_shipmode = 'air' order by l_quantity desc limit 1
Question: which line item with the highest quantity is shipped by air? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_com...
which line item with the highest quantity is shipped by air?
retails
select c_name from customer where c_acctbal < 0
Question: list the names of customers whose accounts are in debt. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitda...
list the names of customers whose accounts are in debt.
retails
select count(t1.c_name) from customer as t1 inner join nation as t2 on t1.c_nationkey = t2.n_nationkey where t1.c_mktsegment = 'household' and t2.n_name = 'germany'
Question: how many customers belong to the household segment in germany? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_c...
how many customers belong to the household segment in germany?
retails
select t2.c_phone from orders as t1 inner join customer as t2 on t1.o_custkey = t2.c_custkey where t1.o_orderpriority = '1-urgent'
Question: list the phone numbers of customers whose order priority is urgent. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax...
list the phone numbers of customers whose order priority is urgent.
retails
select t3.c_name from orders as t1 inner join lineitem as t2 on t1.o_orderkey = t2.l_orderkey inner join customer as t3 on t1.o_custkey = t3.c_custkey order by t2.l_discount desc limit 1
Question: name of customer whose order is applied with the highest discount. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax,...
name of customer whose order is applied with the highest discount.
retails
select t1.o_orderkey, t2.l_shipdate from orders as t1 inner join lineitem as t2 on t1.o_orderkey = t2.l_orderkey order by t1.o_totalprice desc limit 5
Question: list the 5 orders with the highest total price, indicating the delivery date. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linesta...
list the 5 orders with the highest total price, indicating the delivery date.
retails
select t1.o_comment from orders as t1 inner join customer as t2 on t1.o_custkey = t2.c_custkey where t2.c_mktsegment = 'furniture'
Question: list the comments describing orders from customers in the furniture segment. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestat...
list the comments describing orders from customers in the furniture segment.
retails
select t2.c_name from orders as t1 inner join customer as t2 on t1.o_custkey = t2.c_custkey where t1.o_totalprice > 300000
Question: please indicate the names of the customers whose order with a total price over $300000. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey,...
please indicate the names of the customers whose order with a total price over $300000.
retails
select t1.c_name from customer as t1 inner join nation as t2 on t1.c_nationkey = t2.n_nationkey where t1.c_acctbal > 5000 and t2.n_name = 'india'
Question: name customers in india with account balances over $5000. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commit...
name customers in india with account balances over $5000.
retails
select t1.s_phone from supplier as t1 inner join nation as t2 on t1.s_nationkey = t2.n_nationkey where t2.n_name = 'japan'
Question: list the phone numbers of suppliers from japan. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_re...
list the phone numbers of suppliers from japan.
retails
select t1.s_name 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 = 'argentina'
Question: among the providers in argentina, which supplier has an account that is in debt? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_line...
among the providers in argentina, which supplier has an account that is in debt?
retails
select count(t1.r_name) from region as t1 inner join nation as t2 on t1.r_regionkey = t2.n_regionkey where t2.n_name = 'algeria'
Question: how many countries belong to the algeria region? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_r...
how many countries belong to the algeria region?
retails
select t3.c_name from orders as t1 inner join lineitem as t2 on t1.o_orderkey = t2.l_orderkey inner join customer as t3 on t1.o_custkey = t3.c_custkey where t2.l_discount = 0.1 and strftime('%y', t1.o_orderdate) between 1994 and 1995
Question: please indicate the names of customers whose orders are eligible for 10% discount with order dates between 1/1/1994 and 1/1/1995. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_sup...
please indicate the names of customers whose orders are eligible for 10% discount with order dates between 1/1/1994 and 1/1/1995.
retails
select cast(sum(iif(t1.r_name = 'america', 1, 0)) as real) * 100 / count(t2.n_name) from region as t1 inner join nation as t2 on t1.r_regionkey = t2.n_regionkey
Question: calculate the percentage of countries that belong to the american region. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus,...
calculate the percentage of countries that belong to the american region.
retails
select cast(sum(iif(t1.c_mktsegment = 'household', 1, 0)) as real) * 100 / count(t1.c_mktsegment) from customer as t1 inner join nation as t2 on t1.c_nationkey = t2.n_nationkey where t2.n_name = 'indonesia'
Question: calculate percentage of household segment in indonesia. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitda...
calculate percentage of household segment in indonesia.
retails
select p_name from part where p_type = 'promo brushed steel'
Question: please list the names of all the products under the type 'promo brushed steel'. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_lines...
please list the names of all the products under the type 'promo brushed steel'.
retails
select p_comment from part where p_name = 'burlywood plum powder puff mint'
Question: what is the comment of the product 'burlywood plum powder puff mint'? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_t...
what is the comment of the product 'burlywood plum powder puff mint'?
retails
select count(p_partkey) from part where p_retailprice > 1900
Question: how many parts have a retail price of over 1900? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_r...
how many parts have a retail price of over 1900?
retails
select count(p_partkey) from part where p_type = 'promo brushed steel' and p_mfgr = 'manufacturer#5'
Question: among the products under the type 'promo brushed steel', how many of them are manufactured by manufacturer#5? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_...
among the products under the type 'promo brushed steel', how many of them are manufactured by manufacturer#5?
retails
select p_brand from part where p_type = 'promo brushed steel'
Question: please list all the brands that contain a part under the type 'promo brushed steel'. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_...
please list all the brands that contain a part under the type 'promo brushed steel'.
retails
select p_name from part where p_retailprice = ( select max(p_retailprice) from part )
Question: what is the name of the product with the highest retail price? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_c...
what is the name of the product with the highest retail price?
retails
select t.p_name from ( select p_name, p_size from part where p_name in ('pink powder drab lawn cyan', 'cornflower sky burlywood green beige') ) as t order by p_size desc limit 1
Question: which part has a bigger size, 'pink powder drab lawn cyan' or 'cornflower sky burlywood green beige'? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnfl...
which part has a bigger size, 'pink powder drab lawn cyan' or 'cornflower sky burlywood green beige'?
retails
select count(p_partkey) from part where p_container = 'jumbo case'
Question: how many parts have a jumbo case container? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_receip...
how many parts have a jumbo case container?
retails
select min(p_size) from part where p_container = 'jumbo case'
Question: what is the size of the smallest part in a jumbo case container? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l...
what is the size of the smallest part in a jumbo case container?
retails
select count(s_suppkey) from supplier where s_acctbal < 0
Question: how many suppliers have their accounts in debt? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_re...
how many suppliers have their accounts in debt?
retails
select s_name from supplier order by s_acctbal desc limit 3
Question: please list the names of the top 3 suppliers with the most amount of money in their accounts. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_pa...
please list the names of the top 3 suppliers with the most amount of money in their accounts.
retails
select t1.s_phone from supplier as t1 inner join nation as t2 on t1.s_nationkey = t2.n_nationkey where t2.n_name = 'germany'
Question: please list the phone numbers of all the suppliers in germany. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_c...
please list the phone numbers of all the suppliers in germany.
retails
select t2.s_name from partsupp as t1 inner join supplier as t2 on t1.ps_suppkey = t2.s_suppkey inner join part as t3 on t1.ps_partkey = t3.p_partkey where t3.p_name = 'hot spring dodger dim light'
Question: please list the names of all the suppliers for the part 'hot spring dodger dim light'. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, ...
please list the names of all the suppliers for the part 'hot spring dodger dim light'.
retails
select min(t1.ps_supplycost) from partsupp as t1 inner join part as t2 on t1.ps_partkey = t2.p_partkey where t2.p_name = 'hot spring dodger dim light'
Question: what is the lowest supply cost for the part 'hot spring dodger dim light'? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus...
what is the lowest supply cost for the part 'hot spring dodger dim light'?
retails
select t2.s_name from partsupp as t1 inner join supplier as t2 on t1.ps_suppkey = t2.s_suppkey inner join part as t3 on t1.ps_partkey = t3.p_partkey where t3.p_name = 'hot spring dodger dim light' order by t1.ps_supplycost limit 1
Question: what is the name of the supplier that provides the part 'hot spring dodger dim light' with the lowest supply cost? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantit...
what is the name of the supplier that provides the part 'hot spring dodger dim light' with the lowest supply cost?
retails
select sum(t1.ps_availqty) from partsupp as t1 inner join part as t2 on t1.ps_partkey = t2.p_partkey where t2.p_name = 'hot spring dodger dim light'
Question: what is the total quantity available by all suppliers for the part 'hot spring dodger dim light'? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, ...
what is the total quantity available by all suppliers for the part 'hot spring dodger dim light'?
retails
select t3.s_phone from part as t1 inner join partsupp as t2 on t1.p_partkey = t2.ps_partkey inner join supplier as t3 on t2.ps_suppkey = t3.s_suppkey where t1.p_name = 'hot spring dodger dim light' order by t2.ps_availqty desc limit 1
Question: which supplier can provide the most number of 'hot spring dodger dim light'? please give the supplier's phone number. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quan...
which supplier can provide the most number of 'hot spring dodger dim light'? please give the supplier's phone number.
retails
select t3.s_phone from part as t1 inner join partsupp as t2 on t1.p_partkey = t2.ps_partkey inner join supplier as t3 on t2.ps_suppkey = t3.s_suppkey where t1.p_name = 'hot spring dodger dim light' order by t1.p_size desc limit 1
Question: please list the names of all the suppliers for the part with the highest retail price. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, ...
please list the names of all the suppliers for the part with the highest retail price.
retails
select count(t3.s_name) from part as t1 inner join partsupp as t2 on t1.p_partkey = t2.ps_partkey inner join supplier as t3 on t2.ps_suppkey = t3.s_suppkey inner join nation as t4 on t3.s_nationkey = t4.n_nationkey where t1.p_name = 'hot spring dodger dim light' and t4.n_name = 'vietnam'
Question: how many suppliers for the part 'hot spring dodger dim light' are in vietnam? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linesta...
how many suppliers for the part 'hot spring dodger dim light' are in vietnam?
retails
select count(t3.s_name) from part as t1 inner join partsupp as t2 on t1.p_partkey = t2.ps_partkey inner join supplier as t3 on t2.ps_suppkey = t3.s_suppkey where t3.s_acctbal < 0 and t1.p_type = 'promo brushed steel'
Question: among the suppliers providing parts under the type 'promo brushed steel', how many of them are in debt? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_return...
among the suppliers providing parts under the type 'promo brushed steel', how many of them are in debt?
retails
select t3.s_name from part as t1 inner join partsupp as t2 on t1.p_partkey = t2.ps_partkey inner join supplier as t3 on t2.ps_suppkey = t3.s_suppkey where t1.p_brand = 'brand#55'
Question: please list the names of all the suppliers for parts under brand#55. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_ta...
please list the names of all the suppliers for parts under brand#55.
retails
select sum(num) from ( select count(t3.s_name) as num from part as t1 inner join partsupp as t2 on t1.p_partkey = t2.ps_partkey inner join supplier as t3 on t2.ps_suppkey = t3.s_suppkey where t1.p_type = 'promo brushed steel' group by t2.ps_partkey having sum(t2.ps_availqty) < 5000 ) t
Question: among all the parts under the type 'promo brushed steel', how many of them have a total available quantity from all suppliers of under 5000? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedp...
among all the parts under the type 'promo brushed steel', how many of them have a total available quantity from all suppliers of under 5000?
retails
select count(t1.p_partkey) from part as t1 inner join lineitem as t2 on t1.p_partkey = t2.l_partkey where t1.p_name = 'hot spring dodger dim light'
Question: the part 'hot spring dodger dim light' is ordered in how many orders? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_t...
the part 'hot spring dodger dim light' is ordered in how many orders?
retails
select sum(t1.p_partkey) from part as t1 inner join lineitem as t2 on t1.p_partkey = t2.l_partkey where t1.p_name = 'hot spring dodger dim light'
Question: what is the total quantity of the part 'hot spring dodger dim light' ordered in all orders? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_part...
what is the total quantity of the part 'hot spring dodger dim light' ordered in all orders?
retails
select t.l_orderkey from ( select t2.l_orderkey, count(t2.l_partkey) as num from part as t1 inner join lineitem as t2 on t1.p_partkey = t2.l_partkey where t1.p_container = 'jumbo case' group by t2.l_orderkey ) as t where t.num > 2
Question: please list the order keys of all the orders that have more than 2 parts with a jumbo case container. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnfl...
please list the order keys of all the orders that have more than 2 parts with a jumbo case container.
retails
select count(t1.n_nationkey) from nation as t1 inner join region as t2 on t1.n_regionkey = t2.r_regionkey inner join supplier as t3 on t1.n_nationkey = t3.s_nationkey where t2.r_name = 'europe' and t3.s_acctbal < 0
Question: among all the suppliers in debt, how many of them are in europe? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l...
among all the suppliers in debt, how many of them are in europe?
retails
select count(t1.r_regionkey) from region as t1 inner join nation as t2 on t1.r_regionkey = t2.n_regionkey inner join supplier as t3 on t2.n_nationkey = t3.s_nationkey where t1.r_name = 'europe'
Question: among all the suppliers providing the part 'hot spring dodger dim light', how many of them are in europe? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_retu...
among all the suppliers providing the part 'hot spring dodger dim light', how many of them are in europe?
retails
select t2.s_phone from lineitem as t1 inner join supplier as t2 on t1.l_suppkey = t2.s_suppkey where t1.l_orderkey = 1
Question: please list the phone numbers of all the suppliers for the parts ordered in order no.1. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey,...
please list the phone numbers of all the suppliers for the parts ordered in order no.1.
retails
select count(t1.l_linenumber) from lineitem as t1 inner join supplier as t2 on t1.l_suppkey = t2.s_suppkey where t1.l_orderkey = 4 and t2.s_acctbal < 0
Question: among the suppliers for the parts ordered in order no.4, how many of them are in debt? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, ...
among the suppliers for the parts ordered in order no.4, how many of them are in debt?
retails
select count(t1.l_partkey) from lineitem as t1 inner join supplier as t2 on t1.l_suppkey = t2.s_suppkey where t1.l_returnflag = 'r' and t2.s_acctbal < 0
Question: among the parts that are returned, how many of them are provided by a supplier in debt? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey,...
among the parts that are returned, how many of them are provided by a supplier in debt?
retails
select t1.l_shipdate from lineitem as t1 inner join part as t2 on t1.l_partkey = t2.p_partkey where t1.l_orderkey = 1 and t2.p_name = 'burnished seashell gainsboro navajo chocolate'
Question: on which date was the part 'burnished seashell gainsboro navajo chocolate' in order no.1 shipped? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, ...
on which date was the part 'burnished seashell gainsboro navajo chocolate' in order no.1 shipped?
retails
select t1.l_quantity from lineitem as t1 inner join part as t2 on t1.l_partkey = t2.p_partkey where t1.l_orderkey = 1 and t2.p_name = 'burnished seashell gainsboro navajo chocolate'
Question: what is the quantity of the part 'burnished seashell gainsboro navajo chocolate' ordered in order no.1? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_return...
what is the quantity of the part 'burnished seashell gainsboro navajo chocolate' ordered in order no.1?
retails
select t.p_name from ( select t2.p_name, sum(t1.l_quantity) as num from lineitem as t1 inner join part as t2 on t1.l_partkey = t2.p_partkey where t2.p_name in ('salmon white grey tan navy', 'burnished seashell gainsboro navajo chocolate') group by t1.l_partkey ) as t order by t.num desc limit 1
Question: which part is ordered in a bigger amount in order no.1, 'burnished seashell gainsboro navajo chocolate' or 'salmon white grey tan navy'? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice...
which part is ordered in a bigger amount in order no.1, 'burnished seashell gainsboro navajo chocolate' or 'salmon white grey tan navy'?
retails
select max(t1.l_discount) from lineitem as t1 inner join part as t2 on t1.l_partkey = t2.p_partkey where t2.p_name = 'burnished seashell gainsboro navajo chocolate'
Question: what is the biggest discount among all orders for the part 'burnished seashell gainsboro navajo chocolate'? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_re...
what is the biggest discount among all orders for the part 'burnished seashell gainsboro navajo chocolate'?
retails
select distinct t1.l_shipmode from lineitem as t1 inner join part as t2 on t1.l_partkey = t2.p_partkey where t2.p_name = 'burnished seashell gainsboro navajo chocolate'
Question: please list all the modes of shipping for the part 'burnished seashell gainsboro navajo chocolate'. | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag...
please list all the modes of shipping for the part 'burnished seashell gainsboro navajo chocolate'.
retails
select avg(t1.ps_supplycost) from partsupp as t1 inner join supplier as t2 on t1.ps_suppkey = t2.s_suppkey inner join part as t3 on t1.ps_partkey = t3.p_partkey where t3.p_name = 'hot spring dodger dim light'
Question: what is the average supply cost for the part 'hot spring dodger dim light'? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatu...
what is the average supply cost for the part 'hot spring dodger dim light'?
retails
select cast((max(t1.ps_supplycost) - min(t1.ps_supplycost)) as real) * 100 / min(t1.ps_supplycost) from partsupp as t1 inner join supplier as t2 on t1.ps_suppkey = t2.s_suppkey inner join part as t3 on t1.ps_partkey = t3.p_partkey where t3.p_name = 'hot spring dodger dim light'
Question: how much higher in percentage is the highest supply cost of the part 'hot spring dodger dim light' than the lowest supply cost? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppk...
how much higher in percentage is the highest supply cost of the part 'hot spring dodger dim light' than the lowest supply cost?
retails
select t1.l_extendedprice * (1 - t1.l_discount) - t2.ps_supplycost * t1.l_quantity from lineitem as t1 inner join partsupp as t2 on t1.l_suppkey = t2.ps_suppkey where t1.l_orderkey = 1 and t1.l_partkey = 98768
Question: what is the profit for part no.98768 in order no.1? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, ...
what is the profit for part no.98768 in order no.1?
retails
select t1.l_extendedprice * (1 - t1.l_discount) from lineitem as t1 inner join part as t2 on t1.l_partkey = t2.p_partkey where t2.p_name = 'burnished seashell gainsboro navajo chocolate' and t1.l_orderkey = 1
Question: what is the discounted price of the part 'burnished seashell gainsboro navajo chocolate' in order no.1? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_return...
what is the discounted price of the part 'burnished seashell gainsboro navajo chocolate' in order no.1?
retails
select c_mktsegment from customer where c_acctbal = ( select min(c_acctbal) from customer )
Question: which market segment does the customer with the highest amount of debt belongs to? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_li...
which market segment does the customer with the highest amount of debt belongs to?
retails
select count(l_orderkey) from lineitem where strftime('%y', l_shipdate) = '1997' and l_shipmode = 'mail'
Question: in 1997, how many orders were shipped via mail? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_re...
in 1997, how many orders were shipped via mail?
retails
select count(c_custkey) from customer where c_mktsegment = 'furniture'
Question: how many customers are in the furniture segment? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, l_tax, l_commitdate, l_r...
how many customers are in the furniture segment?
retails
select count(l_orderkey) from lineitem where strftime('%y', l_shipdate) = '1994' and l_returnflag = 'r' and l_shipmode = 'truck'
Question: among the items shipped in 1994 via truck, how many items were returned? | Tables: customer -> c_custkey, c_mktsegment, c_nationkey, c_name, c_address, c_phone, c_acctbal, c_comment. lineitem -> l_shipdate, l_orderkey, l_discount, l_extendedprice, l_suppkey, l_quantity, l_returnflag, l_partkey, l_linestatus, ...
among the items shipped in 1994 via truck, how many items were returned?