question_id
int64
1
75.7k
db_id
stringclasses
33 values
db_name
stringclasses
4 values
question
stringlengths
19
259
partition
stringclasses
4 values
difficulty
stringclasses
3 values
SQL
stringlengths
25
862
601
retails
bird
What is the total price charged for orders shipped by air without shipping instructions?
train
medium
SELECT l_extendedprice * (1 - l_discount) * (1 + l_tax) AS totalprice FROM lineitem WHERE l_shipmode = 'air' AND l_shipinstruct = 'none'
602
retails
bird
Of the orders with a lower delivery priority, how many have an urgent priority order?
train
medium
SELECT COUNT(o_orderkey) FROM orders WHERE o_orderpriority = '1-urgent' GROUP BY o_orderdate ORDER BY o_orderdate DESC LIMIT 1
603
retails
bird
How many suppliers from Egypt have a debit balance?
train
hard
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 = 'egypt'
604
retails
bird
How many items shipped by REG AIR were ordered on March 22, 1995?
train
hard
SELECT COUNT(t1.o_orderkey) FROM orders AS t1 INNER JOIN lineitem AS t2 ON t1.o_orderkey = t2.l_orderkey WHERE t2.l_shipmode = 'reg air' AND t1.o_orderdate = '1995-03-22'
605
retails
bird
How many European suppliers are there?
train
hard
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'
606
retails
bird
To which segment belongs the customer that made the most orders in April 1994?
train
hard
SELECT t.c_mktsegment FROM (SELECT t2.c_mktsegment, COUNT(t1.o_orderkey) AS num FROM orders AS t1 INNER JOIN customer AS t2 ON t1.o_custkey = t2.c_custkey WHERE t1.o_orderdate LIKE '1994-04-%' GROUP BY t1.o_custkey) AS t ORDER BY t.num DESC LIMIT 1
607
retails
bird
Lists all parts supplied by Supplier#000000034.
train
hard
SELECT t3.p_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 t2.s_name = 'supplier#000000034'
608
retails
bird
What are the cost prices of large burnished copper?
train
hard
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 burnished copper'
609
retails
bird
How many clients from Mozambique required orders with a low priority order?
train
hard
SELECT COUNT(t1.c_custkey) FROM customer AS t1 INNER JOIN nation AS t2 ON t1.c_nationkey = t2.n_nationkey INNER JOIN orders AS t3 ON t1.c_custkey = t3.o_custkey WHERE t2.n_name = 'mozambique' AND t3.o_orderpriority = '5-low'
610
retails
bird
Indicate the name of the product that is close to being sold out and that has the lowest cost price.
train
hard
SELECT t1.p_name FROM part AS t1 INNER JOIN partsupp AS t2 ON t1.p_partkey = t2.ps_partkey WHERE t2.ps_availqty < 10 ORDER BY t2.ps_supplycost LIMIT 1
611
retails
bird
How many different clerks have served the customer with the address uFTe2u518et8Q8UC?
train
hard
SELECT COUNT(t1.o_clerk) FROM orders AS t1 INNER JOIN customer AS t2 ON t1.o_custkey = t2.c_custkey WHERE t2.c_address = 'ufte2u518et8q8uc'
612
retails
bird
Indicate the name of the parts without discount.
train
hard
SELECT t3.p_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 WHERE t2.l_discount = 0.0000
613
retails
bird
How many suppliers from Germany have left a comment with 'carefully regular packages'?
train
hard
SELECT COUNT(t1.s_suppkey) FROM supplier AS t1 INNER JOIN nation AS t2 ON t1.s_nationkey = t2.n_nationkey WHERE t2.n_name = 'germany' AND t1.s_comment LIKE '%carefully regular packages%'
614
retails
bird
How many products shipped on 19/11/1994 were ordered on 21/09/1994?
train
hard
SELECT COUNT(t2.l_partkey) FROM orders AS t1 INNER JOIN lineitem AS t2 ON t1.o_orderkey = t2.l_orderkey WHERE t1.o_orderdate = '1994-09-21' AND t2.l_shipdate = '1994-11-19'
615
retails
bird
Calculate the average profit of prom brushed steel products.
train
hard
SELECT CAST(SUM(t2.l_extendedprice * (1 - t2.l_discount) - t1.ps_supplycost * t2.l_quantity) AS REAL) / COUNT(t1.ps_partkey) 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 WHERE t3.p_type = 'promo brushed steel'
616
retails
bird
What percentage of customers engaged in the household segment are from Iran?
train
hard
SELECT CAST(CAST(SUM(IIF(t2.n_name = 'iran', 1, 0)) AS REAL) * 100 AS REAL) / COUNT(t2.n_name) FROM customer AS t1 INNER JOIN nation AS t2 ON t1.c_nationkey = t2.n_nationkey WHERE t1.c_mktsegment = 'household'
617
retails
bird
Please state the segment, the name, the address, and the phone number of customer number 3.
train
easy
SELECT c_mktsegment, c_name, c_address, c_phone FROM customer WHERE c_custkey = 3
618
retails
bird
Please list any three line item numbers that have 10% off.
train
easy
SELECT l_linenumber FROM lineitem WHERE l_discount = 0.1 LIMIT 3
619
retails
bird
How many of the line items that have a quantity greater than 40 have been shipped by air?
train
medium
SELECT COUNT(l_linenumber) FROM lineitem WHERE l_quantity > 40 AND l_shipmode = 'air'
620
retails
bird
Which ship mode has more "deliver in person" instructions, rail or mail?
train
easy
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'
621
retails
bird
What is the total price and the order priority of order number 33?
train
medium
SELECT o_totalprice, o_orderpriority FROM orders WHERE o_orderkey = 33
622
retails
bird
How many orders in 1998 had a total price under 950?
train
medium
SELECT COUNT(o_orderkey) AS countorders FROM orders WHERE STRFTIME('%y', o_orderdate) = '1998' AND o_totalprice < 950
623
retails
bird
Please list any three customers with debt.
train
easy
SELECT c_name FROM customer WHERE c_acctbal < 0 LIMIT 3
624
retails
bird
What is the discounted price of line item number 1?
train
easy
SELECT l_extendedprice * (1 - l_discount) FROM lineitem WHERE l_linenumber = 1
625
retails
bird
What is the difference between the number of returned items and not returned items with the full price of under 16947.7?
train
easy
SELECT SUM(IIF(l_returnflag = 'a', 1, 0)) - SUM(IIF(l_returnflag = 'n', 1, 0)) AS diff FROM lineitem WHERE l_extendedprice < 16947.7
626
retails
bird
What is the supply cost of large plated tin?
train
hard
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'
627
retails
bird
Please name any three parts that have an available quantity of more than 9998.
train
hard
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
628
retails
bird
Please list any two parts that come with the wrap bag container and have a supply cost of under 10.
train
hard
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
629
retails
bird
What is the nationality of supplier number 1?
train
hard
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
630
retails
bird
What are the countries that belong to Africa?
train
hard
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'
631
retails
bird
Which region has the lowest number of countries?
train
hard
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
632
retails
bird
How many customers from the furniture segments come from Iraq?
train
hard
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'
633
retails
bird
What is the name of the customer number 93697 with the total order price of 191918.92?
train
hard
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
634
retails
bird
Which nation and region does the Customer#000000008 come from?
train
hard
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'
635
retails
bird
What is the delivery time and the clerk of order number 6?
train
hard
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
636
retails
bird
How many Japanese suppliers have their accounts in debt?
train
hard
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'
637
retails
bird
Which customer is the most in debt?
train
easy
SELECT c_name FROM customer WHERE c_acctbal = (SELECT MIN(c_acctbal) FROM customer)
638
retails
bird
List all the dates of the urgent orders.
train
medium
SELECT o_orderdate FROM orders WHERE o_orderpriority = '1-urgent'
639
retails
bird
How many of the items are instructed to be delivered in person?
train
easy
SELECT COUNT(l_linenumber) FROM lineitem WHERE l_shipinstruct = 'deliver in person'
640
retails
bird
What is the largest supplier's account balance?
train
easy
SELECT MAX(s_acctbal) FROM supplier
641
retails
bird
How many part supplies are close to being out of stock?
train
easy
SELECT COUNT(ps_suppkey) FROM partsupp WHERE ps_availqty < 10
642
retails
bird
List all the nations in Europe.
train
hard
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'
643
retails
bird
What is the supply cost for the part "violet olive rose ivory sandy"?
train
hard
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'
644
retails
bird
List all the customers' phone numbers from Ethiopia.
train
hard
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'
645
retails
bird
What is the total price of all orders from the customer with the phone number "627-220-3983"?
train
hard
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'
646
retails
bird
What are the shipping methods for the orders on 12/31/1994?
train
hard
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'
647
retails
bird
What is the account balance of the supplier with the most parts?
train
hard
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
648
retails
bird
Which nation does the supplier with the account balance of "4393.04" belong to?
train
hard
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
649
retails
bird
What is the region with the most customers?
train
hard
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
650
retails
bird
List the phone number of the customer who placed orders with a total price of more than $300,000.
train
hard
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
651
retails
bird
What are the clerks of orders with line items shipped by mail?
train
hard
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'
652
retails
bird
What are the top 5 nations of suppliers with the lowest account balance?
train
hard
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
653
retails
bird
List all the addresses for the suppliers of the biggest parts.
train
hard
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
654
retails
bird
Which part and supplier have the most profit?
train
hard
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
655
retails
bird
What proportion of suppliers are from Asia?
train
hard
SELECT CAST(CAST(SUM(IIF(t1.r_name = 'asia', 1, 0)) AS REAL) * 100 AS REAL) / 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
656
retails
bird
Please indicate the total price of order key 32.
train
medium
SELECT o_totalprice FROM orders WHERE o_orderkey = 32
657
retails
bird
How many order keys are not applied for the discount?
train
easy
SELECT COUNT(l_orderkey) FROM lineitem WHERE l_discount = 0
658
retails
bird
List line items shipped by truck with delivery time before 1997.
train
medium
SELECT l_linenumber FROM lineitem WHERE STRFTIME('%y', l_shipdate) < 1997 AND l_shipmode = 'truck'
659
retails
bird
How many line items were returned in 1998?
train
medium
SELECT l_linenumber FROM lineitem WHERE STRFTIME('%y', l_shipdate) < 1997 AND l_shipmode = 'truck'
660
retails
bird
Which line item with the highest quantity is shipped by air?
train
easy
SELECT l_linenumber FROM lineitem WHERE l_shipmode = 'air' ORDER BY l_quantity DESC LIMIT 1
661
retails
bird
List the names of customers whose accounts are in debt.
train
easy
SELECT c_name FROM customer WHERE c_acctbal < 0
662
retails
bird
How many customers belong to the household segment in Germany?
train
hard
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'
663
retails
bird
List the phone numbers of customers whose order priority is urgent.
train
hard
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'
664
retails
bird
Name of customer whose order is applied with the highest discount.
train
hard
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
665
retails
bird
List the 5 orders with the highest total price, indicating the delivery date.
train
hard
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
666
retails
bird
List the comments describing orders from customers in the furniture segment.
train
hard
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'
667
retails
bird
Please indicate the names of the customers whose order with a total price over $300000.
train
hard
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
668
retails
bird
Name customers in India with account balances over $5000.
train
hard
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'
669
retails
bird
List the phone numbers of suppliers from Japan.
train
hard
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'
670
retails
bird
Among the providers in Argentina, which supplier has an account that is in debt?
train
hard
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'
671
retails
bird
How many countries belong to the Algeria region?
train
hard
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'
672
retails
bird
Please indicate the names of customers whose orders are eligible for 10% discount with order dates between 1/1/1994 and 1/1/1995.
train
hard
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
673
retails
bird
Calculate the percentage of countries that belong to the American region.
train
hard
SELECT CAST(CAST(SUM(IIF(t1.r_name = 'america', 1, 0)) AS REAL) * 100 AS REAL) / COUNT(t2.n_name) FROM region AS t1 INNER JOIN nation AS t2 ON t1.r_regionkey = t2.n_regionkey
674
retails
bird
Calculate percentage of household segment in Indonesia.
train
hard
SELECT CAST(CAST(SUM(IIF(t1.c_mktsegment = 'household', 1, 0)) AS REAL) * 100 AS REAL) / 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'
675
retails
bird
Please list the names of all the products under the type "promo brushed steel".
train
easy
SELECT p_name FROM part WHERE p_type = 'promo brushed steel'
676
retails
bird
What is the comment of the product "burlywood plum powder puff mint"?
train
easy
SELECT p_comment FROM part WHERE p_name = 'burlywood plum powder puff mint'
677
retails
bird
How many parts have a retail price of over 1900?
train
easy
SELECT COUNT(p_partkey) FROM part WHERE p_retailprice > 1900
678
retails
bird
Among the products under the type "promo brushed steel", how many of them are manufactured by Manufacturer#5?
train
medium
SELECT COUNT(p_partkey) FROM part WHERE p_type = 'promo brushed steel' AND p_mfgr = 'manufacturer#5'
679
retails
bird
Please list all the brands that contain a part under the type "promo brushed steel".
train
easy
SELECT p_brand FROM part WHERE p_type = 'promo brushed steel'
680
retails
bird
What is the name of the product with the highest retail price?
train
easy
SELECT p_name FROM part WHERE p_retailprice = (SELECT MAX(p_retailprice) FROM part)
681
retails
bird
Which part has a bigger size, "pink powder drab lawn cyan" or "cornflower sky burlywood green beige"?
train
medium
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
682
retails
bird
How many parts have a jumbo case container?
train
easy
SELECT COUNT(p_partkey) FROM part WHERE p_container = 'jumbo case'
683
retails
bird
What is the size of the smallest part in a jumbo case container?
train
easy
SELECT MIN(p_size) FROM part WHERE p_container = 'jumbo case'
684
retails
bird
How many suppliers have their accounts in debt?
train
easy
SELECT COUNT(s_suppkey) FROM supplier WHERE s_acctbal < 0
685
retails
bird
Please list the names of the top 3 suppliers with the most amount of money in their accounts.
train
hard
SELECT s_name FROM supplier ORDER BY s_acctbal DESC LIMIT 3
686
retails
bird
Please list the phone numbers of all the suppliers in Germany.
train
hard
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'
687
retails
bird
Please list the names of all the suppliers for the part "hot spring dodger dim light".
train
hard
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'
688
retails
bird
What is the lowest supply cost for the part "hot spring dodger dim light"?
train
hard
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'
689
retails
bird
What is the name of the supplier that provides the part "hot spring dodger dim light" with the lowest supply cost?
train
hard
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
690
retails
bird
What is the total quantity available by all suppliers for the part "hot spring dodger dim light"?
train
hard
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'
691
retails
bird
Which supplier can provide the most number of "hot spring dodger dim light"? Please give the supplier's phone number.
train
hard
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
692
retails
bird
Please list the names of all the suppliers for the part with the highest retail price.
train
hard
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
693
retails
bird
How many suppliers for the part "hot spring dodger dim light" are in Vietnam?
train
hard
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'
694
retails
bird
Among the suppliers providing parts under the type "promo brushed steel", how many of them are in debt?
train
hard
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'
695
retails
bird
Please list the names of all the suppliers for parts under Brand#55.
train
hard
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'
696
retails
bird
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?
train
hard
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) AS t
697
retails
bird
The part "hot spring dodger dim light" is ordered in how many orders?
train
hard
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'
698
retails
bird
What is the total quantity of the part "hot spring dodger dim light" ordered in all orders?
train
hard
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'
699
retails
bird
Please list the order keys of all the orders that have more than 2 parts with a jumbo case container.
train
hard
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
700
retails
bird
Among all the suppliers in debt, how many of them are in Europe?
train
hard
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