db_id
stringclasses 69
values | question
stringlengths 24
321
| evidence
stringlengths 0
673
| SQL
stringlengths 30
743
| question_id
int64 0
6.6k
| difficulty
stringclasses 3
values |
---|---|---|---|---|---|
university | Provide the name of the university with the highest number of male students. | highest number of female students refers to MAX(SUBTRACT(num_students, DIVIDE(MULTIPLY(num_students, pct_female_students), 100))); name of university refers to university_name | SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id ORDER BY T1.num_students * T1.pct_female_students / 100 - T1.num_students DESC LIMIT 1 | 700 | simple |
books | Give the publisher's name of the books authored by Alan Lee. | "Alan Lee" is the author_name; publisher's name refers to publisher_name | SELECT T4.publisher_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN publisher AS T4 ON T4.publisher_id = T1.publisher_id WHERE T3.author_name = 'Alan Lee' GROUP BY T4.publisher_name | 701 | moderate |
donor | What is the name of the item that is provided in the biggest amount by the vendor Lakeshore Learning Materials? | lakeshore Learning Materials is vendor_name; biggest amount refers to Max(item_quantity); | SELECT item_name FROM resources WHERE vendor_name = 'Lakeshore Learning Materials' ORDER BY item_quantity DESC LIMIT 1 | 702 | simple |
donor | Did the project 'I Can't See It...Can You Help Me???' get the tip for the donation? | I Can't See It...Can You Help Me???' is the title; | SELECT T2.donation_included_optional_support FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'I Can''t See It...Can You Help Me???' | 703 | simple |
movielens | For the male users no older than 18, how many times have they given the highest rating? | Male users refers to u_gender = 'M' | SELECT COUNT(T1.movieid) FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T1.rating = 5 AND T2.age < 18 AND T2.u_gender = 'M' | 704 | simple |
authors | How many papers were written by authors who cooperated with University of Hong Kong? | University of Hong Kong' is an affiliation | SELECT COUNT(T2.PaperId) FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId WHERE T1.Affiliation = 'University of Hong Kong' | 705 | simple |
simpson_episodes | Among the people in Animation Department, who are credited for additional time in the episode titled by "How the Test Was Won"? | Animation Department refers to category = 'Animation Department'; credited refers to credited = 'true'; for additional timer refers to role = 'additional timer' | SELECT T2.person FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'How the Test Was Won' AND T2.role = 'additional timer' AND T2.credited = 'true' AND T2.category = 'Animation Department'; | 706 | moderate |
retail_complains | Among all the clients from the New York city, how many of them have filed a complaint on the issue of Deposits and withdrawals? | SELECT COUNT(T2.Issue) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Issue = 'Deposits and withdrawals' AND T1.city = 'New York City' | 707 | simple |
|
restaurant | Please name any three restaurants that have an unidentified region. | restaurant name refers to label; unidentified region refers to region = 'unknown' | SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant INNER JOIN geographic AS T3 ON T2.city = T3.city WHERE T3.region = 'unknown' LIMIT 3 | 708 | simple |
college_completion | From which institute is harder to graduate for a bachelor, Amridge University or Auburn University? | institute refers to chronname; harder to graduate for a bachelor refers to MIN(grad_100_value); Amridge University refers to chronname = 'Amridge University'; Auburn University refers to chronname = 'Auburn University'; | SELECT chronname FROM institution_details WHERE chronname IN ('Amridge University', 'Auburn University') ORDER BY grad_100_value LIMIT 1 | 709 | simple |
works_cycles | What is the profit of the product with the highest list price and of the product with the lowest list price other than 0? Indicates the depth the component is from its parent. | profit = subtract(ListPrice, StandardCost); the depth the component from its parent refers to BOMLevel; | SELECT ( SELECT ListPrice - StandardCost FROM Product WHERE ListPrice != 0 ORDER BY ListPrice DESC LIMIT 1 ) , ( SELECT ListPrice - StandardCost FROM Product WHERE ListPrice != 0 ORDER BY ListPrice LIMIT 1 ) | 710 | moderate |
retails | What is the phone number of Customer#000000001? | customer phone refers to c_phone; Customer#000000001 refers to c_name; | SELECT c_phone FROM customer WHERE c_name = 'Customer#000000001' | 711 | simple |
codebase_comments | What is the percentage of solutions for the method that needs to be compiled in the English methods? | method that needs to be compiled refers to WasCompiled = 0; English method refers to Lang = 'en'; percentage of solutions = MULTIPLY(DIVIDE(SUM(WasCompiled = 0), COUNT(Solution.Id)), 100); | SELECT CAST(SUM(CASE WHEN T1.WasCompiled = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Lang) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Lang = 'en' | 712 | moderate |
university | What are the names of the universities that got 98 in teaching in 2011? | in 2011 refers to year 2011; that got 98 refers to score = 98; in teaching refers to criteria_name = 'Teaching'; name of university refers to university_name | SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Teaching' AND T2.year = 2011 AND T2.score = 98 | 713 | simple |
airline | Provide the origin of the flight that has the shortest actual elapsed time. | shortest actual elapsed time refers to MIN(ACTUAL_ELAPSED_TIME); | SELECT ORIGIN FROM Airlines ORDER BY ACTUAL_ELAPSED_TIME ASC LIMIT 1 | 714 | simple |
retails | Please list the order comments of all the orders made by customers in the household segment. | orders in household segment refer to o_orderkey where c_mktsegment = 'HOUSEHOLD'; order comments refer to o_comment; | SELECT T1.o_comment FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD' | 715 | simple |
authors | What is the paper "Stitching videos streamed by mobile phones in real-time" about? | "Stitching videos streamed by mobile phones in real-time" is the Title of paper; what the paper is about refers to Keywords | SELECT Keyword FROM Paper WHERE Title = 'Stitching videos streamed by mobile phones in real-time' | 716 | simple |
movie_platform | Which movie has the highest average score in Mubi? | Highest average score refers to Max(Avg(rating_score)); | SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id GROUP BY T2.movie_title ORDER BY SUM(T1.rating_score) / COUNT(T1.rating_id) DESC LIMIT 1 | 717 | simple |
social_media | Among all the tweets with a positive sentiment, how many of them were posted by male users in Australia? | tweet with positive sentiment refers to Sentiment > 0; male user refers to Gender = 'Male'; 'Australia' is the Country | SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T3 ON T3.UserID = T1.UserID WHERE T2.Country = 'Australia' AND T3.Gender = 'Male' AND T1.Sentiment > 0 | 718 | moderate |
world_development_indicators | How many countries have reached their Adjusted net national income per capita (constant 2005 US$) indicator value to more than 1,000 but have not finished their external debt reporting? | Adjusted net national income per capita (constant 2005 US$) is the IndicatorName; have not finished their external debt reporting means ExternalDebtReportingStatus = 'Preliminary' | SELECT COUNT(T1.CountryCode) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IndicatorName = 'Adjusted net national income per capita (constant 2005 US$)' AND T1.ExternalDebtReportingStatus = 'Preliminary' AND T2.Value > 1000 | 719 | moderate |
shipping | List all the name of the customers that received a shipment in February 2017. | shipment in February 2017 refers to ship_date LIKE '2017-02-%'; name of customer refers to cust_name | SELECT T1.cust_name FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T2.ship_date LIKE '2017-02%' | 720 | simple |
olympics | Where is competitor Estelle Nze Minko from? | Where competitor is from refers to region_name; | SELECT T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'Estelle Nze Minko' | 721 | simple |
works_cycles | What type of employee is David Bradley? | type of employee refers to PersonType; | SELECT PersonType FROM Person WHERE FirstName = 'David' AND LastName = 'Bradley' | 722 | simple |
ice_hockey_draft | List out the seasons that Niklas Eckerblom played. | FALSE; | SELECT DISTINCT T1.SEASON FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Niklas Eckerblom' | 723 | simple |
image_and_language | Name the object class of the image with a bounding (422, 63, 77, 363). | image with a bounding (422, 63, 77, 363) refers to OBJ_CLASS_ID where X = 422 and Y = 63 and W = 77 and H = 363; | SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 422 AND T1.Y = 63 AND T1.W = 77 AND T1.H = 363 | 724 | simple |
video_games | How many games were released on PS4 in 2014? | on PS4 refers to platform_name = 'PS4'; in 2014 refers to release_year = 2014 | SELECT COUNT(DISTINCT T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'PS4' AND T2.release_year = 2014 | 725 | simple |
human_resources | Among the employees working at the office in New York, how many of them have a good job performance? | Sandy Adams is the fullname of an employee; full name = firstname, lastname; New York refers to state = 'NY'; good job performance refers to performance = 'Good'; | SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.state = 'NY' AND T1.performance = 'Good' | 726 | simple |
works_cycles | State the vendor for product number WB-H098. | SELECT T3.Name FROM Product AS T1 INNER JOIN ProductVendor AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Vendor AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE T1.ProductNumber = 'WB-H098' | 727 | simple |
|
student_loan | State name of unemployed students who have the longest duration of absense from school. | longest duration of absense refers to MAX(month) | SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T1.name = T2.name ORDER BY T1.month DESC LIMIT 1 | 728 | simple |
university | In which country does the most populated university in 2014 located ? | the most populated university refers to max(num_students); in 2014 refers to year = 2014 | SELECT T2.country_id FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2014 ORDER BY T1.num_students DESC LIMIT 1 | 729 | simple |
student_loan | How many unemployed and bankrupt students that have payment dues? | have payment dues refers to bool = 'pos' | SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name INNER JOIN no_payment_due AS T3 ON T2.name = T3.name WHERE T3.bool = 'pos' | 730 | simple |
retails | How many urgent orders were shipped the next day? | the order is urgent if o_orderpriority = '1-URGENT'; shipped the next day refers to SUBTRACT(l_shipdate, o_orderdate) = 1; | SELECT COUNT(T2.o_orderkey) FROM lineitem AS T1 INNER JOIN orders AS T2 ON T2.o_orderkey = T1.l_orderkey WHERE JULIANDAY(T1.l_shipdate) - JULIANDAY(T2.o_orderdate) = 1 AND T2.o_orderpriority = '1-URGENT' | 731 | simple |
public_review_platform | What is the review length of user 11021 to business with business ID 3? | review length refers to review_length; user 11021 refers to user_id = 11021; business ID 3 refers to business_id = 3 | SELECT review_length FROM Reviews WHERE user_id = 11021 AND business_id = 3 | 732 | simple |
regional_sales | List all the customers with name containing the word 'Group'. | name containing the word 'Group' refers to Customer Names LIKE '%Group%'; | SELECT T FROM ( SELECT IIF(`Customer Names` LIKE '%Group%', `Customer Names`, NULL) AS T FROM Customers ) WHERE T IS NOT NULL | 733 | simple |
legislator | Which historical legislators are members of the National Greenbacker party? Write their first and last names. | members of the National Greenbacker party refers to party = 'National Greenbacker'; first and last names refers to first_name, last_name | SELECT T2.first_name, T2.last_name FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'National Greenbacker' | 734 | simple |
hockey | Which team got the most bench minor penalties in 2006? | team refers to name; year = 2006 | SELECT name FROM Teams WHERE year = 2006 GROUP BY tmID, name ORDER BY CAST(SUM(BenchMinor) AS REAL) / 2 DESC LIMIT 1 | 735 | simple |
world_development_indicators | How many countries uses the 1968 System of National Accounts methodology? | uses the 1968 System of National Accounts methodology refers to SystemOfNationalAccounts = '1968 System of National Accounts methodology' | SELECT COUNT(CountryCode) FROM Country WHERE SystemOfNationalAccounts = 'Country uses the 1968 System of National Accounts methodology.' | 736 | simple |
simpson_episodes | Who is the writer for the episode with the most 10 star votes? | writer refers to role = 'Writer'; most 10 star votes refers to max(votes) where stars = 10 | SELECT T1.person FROM Credit AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T1.role = 'Writer' AND T2.stars = 10 GROUP BY T1.person ORDER BY COUNT(*) DESC LIMIT 1; | 737 | moderate |
talkingdata | How many female users use device model of MI 3? | female refers to gender = 'F'; | SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' AND T2.device_model = 'MI 3' | 738 | simple |
mondial_geo | State the different ethnic group and percentage of the language in Singapore. | SELECT T1.Name, T1.Percentage FROM ethnicGroup AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'Singapore' GROUP BY T1.Name, T1.Percentage | 739 | simple |
|
regional_sales | Name the sales team and the region of order number 'SO - 000137'. | SELECT T2.`Sales Team`, T2.Region FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderNumber = 'SO - 000137' | 740 | simple |
|
coinmarketcap | What is the average monthly circulating supply for Frozen in 2014. | average monthly circulating supply = AVG(circulating_supply); in 2017 refers to date BETWEEN '2017-01-01' AND '2017-12-31' | SELECT CAST(SUM(T2.circulating_supply) AS REAL) / 12 FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'Frozen' AND STRFTIME('%Y', T2.date) = '2014' | 741 | simple |
world_development_indicators | Which country had the highest value of indicator belongs to Private Sector & Trade: Exports topic? Please list the country name and indicator name. | country refers to CountryName; | SELECT T1.CountryName, T1.IndicatorName FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T2.Topic = 'Private Sector & Trade: Exports' ORDER BY T1.Value DESC LIMIT 1 | 742 | simple |
movie_3 | How many titles did Mary Smith rent in 2005? Determine the percentage of titles rented in June 2005. | in June 2005 refers to month(rental_date) = 6 and year(rental_date) = 2005; percentage = divide(count(inventory_id where month(rental_date) = 6 and year(rental_date) = 2005), count(inventory_id)) * 100% | SELECT COUNT(T2.rental_id) , CAST(SUM(IIF(STRFTIME('%m',T2.rental_date) = '7', 1, 0)) AS REAL) * 100 / COUNT(T2.rental_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'Maria' AND T1.last_name = 'Miller' AND STRFTIME('%Y',T2.rental_date) = '2005' | 743 | moderate |
movie_3 | List down the actor ID of actors with Dee as their last name. | SELECT actor_id FROM actor WHERE last_name = 'Dee' | 744 | simple |
|
trains | Which direction does the majority of the trains that have 3 cars are running? | 3 cars refers to carsNum = 3 | SELECT T1.direction FROM trains AS T1 INNER JOIN ( SELECT train_id, COUNT(id) AS carsNum FROM cars GROUP BY train_id HAVING carsNum = 3 ) AS T2 ON T1.id = T2.train_id GROUP BY T1.direction | 745 | simple |
food_inspection_2 | State the number of violations did Royal Thai Cuisine has during the 2015/5/8 inspection. | Royal Thai Cuisine refers to dba_name = 'ROYAL THAI CUISINE'; 2015/5/8 refers to inspection_date = '2015-05-08' | SELECT COUNT(T3.point_id) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE T2.inspection_date = '2015-05-08' AND T1.dba_name = 'ROYAL THAI CUISINE' | 746 | moderate |
social_media | What is the day of the week that tweet with ID tw-682712873332805633 was posted? | "tw-682712873332805633" is the TweetID; day of the week refers to Weekday | SELECT Weekday FROM twitter WHERE TweetID = 'tw-682712873332805633' | 747 | simple |
restaurant | What percentage of restaurants in Monterey County have Mexican food? | Mexican food refers to food_type = 'mexican'; percentage = divide(count(id_restaurant where food_type = 'mexican'), count(id_restaurant)) where county = 'monterey county' * 100% | SELECT CAST(SUM(IIF(T2.food_type = 'mexican', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.county = 'monterey county' | 748 | simple |
address | How many males are there in New Haven County's residential areas? | "NEW HAVEN" is the county; male refers to male_population | SELECT SUM(T1.male_population) FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'NEW HAVEN' | 749 | simple |
book_publishing_company | What is the publisher's information of New Moon Books? | publisher name refers to pub_name; New Moon Books is a publisher name | SELECT T1.pr_info FROM pub_info AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.pub_name = 'New Moon Books' | 750 | simple |
retail_world | Please list the names of all the territories whose sales are taken in charge by Nancy Davolio. | names of all territories refers to TerritoryDescription; | SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.FirstName = 'Nancy' AND T1.LastName = 'Davolio' | 751 | moderate |
professional_basketball | Among the NBA winning coaches, which are from STL team? Please list their coach id. | NBA refers to lgID = 'NBA'; STL team refers to tmID = 'STL' | SELECT DISTINCT T2.coachID FROM coaches AS T1 INNER JOIN awards_coaches AS T2 ON T1.coachID = T2.coachID WHERE T1.tmID = 'STL' AND T1.lgID = 'NBA' | 752 | simple |
retail_world | For the order paying the highest freight, how many kinds of products does it contain? | highest freight refers to MAX(Freight); kinds of products refers to ProductID; | SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.Freight = ( SELECT MAX(Freight) FROM Orders ) GROUP BY T1.OrderID | 753 | simple |
food_inspection_2 | How many inspections done by Lisa Tillman ended up with the result of "Out of Business"? | the result of "Out of Business" refers to results = 'Out of Business' | SELECT COUNT(T1.inspection_id) FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id WHERE T2.first_name = 'Lisa' AND T2.last_name = 'Tillman' AND T1.results = 'Out of Business' | 754 | simple |
human_resources | How many employees whose performance is poor have a salary of over $50,000 per year? | performance is poor refers to performance = 'Poor'; salary of over $50,000 refers to salary > '50000' | SELECT COUNT(*) FROM employee WHERE performance = 'Poor' AND CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) > 50000 | 755 | simple |
soccer_2016 | State the name of the city with the most venues. | name of the city refers to City_Name; the most venues refers to max(count(Venue_Id)) | SELECT T1.City_Name FROM City AS T1 INNER JOIN Venue AS T2 ON T1.City_Id = T2.City_Id GROUP BY T1.City_Id ORDER BY COUNT(T2.Venue_Id) DESC LIMIT 1 | 756 | simple |
video_games | Tell the genre of the game "Resident Evil: Revelations". | genre refers to genre_name; game "Resident Evil: Revelations" refers to game_name = 'Resident Evil: Revelations' | SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = 'Resident Evil: Revelations' | 757 | simple |
bike_share_1 | Which trip had the longest duration? State the start and end station. | start station refers to start_station_name; end station refers to end_station_name; | SELECT start_station_name, end_station_name FROM trip WHERE duration = ( SELECT MAX(duration) FROM trip ) | 758 | simple |
books | Among Daisey Lamball's orders, how many were shipped via International shipping? | via international shipping refers to method_name = 'International' | SELECT COUNT(*) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Daisey' AND T1.last_name = 'Lamball' AND T3.method_name = 'International' | 759 | moderate |
retail_world | Which region does territory id 2116 belong to? | region refers to RegionDescription | SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryID = 2116 | 760 | simple |
retail_world | List the names of non-US suppliers that have discontinued. | non-US refers to Country <> 'USA'; discontinued refers to Discontinued = 1 | SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1 AND T2.Country != 'USA' | 761 | simple |
movie_platform | Among the lists created in 2016, which is the list that was updated most recently. | created in 2016 refers to list_creation_timestamp_utc like '2016%'; updated most recently refers to MAX(list_update_timestamp_utc) | SELECT list_title FROM lists WHERE strftime('%Y', list_update_timestamp_utc) = '2016' ORDER BY list_update_timestamp_utc DESC LIMIT 1 | 762 | simple |
disney | Who is the villain in Little Mermaid? | Little Mermaid refers to movie_title = 'Little Mermaid'; | SELECT villian FROM characters WHERE movie_title = 'Little Mermaid' | 763 | simple |
donor | How many resources with a unit price less than 15 are not technology type? List them by vendor id | unit price less than 15 refers to item_unit_price< = 15; are not technology type refers to project_resource_type = 'technology' | SELECT vendorid FROM resources WHERE project_resource_type = 'Technology' AND item_unit_price <= 15 | 764 | simple |
authors | Among the papers published in the journal "Molecular Brain", how many of them were published in the year 2011? | "Molecular Brain" is the FullName of journal | SELECT COUNT(T2.Id) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T2.Year = 2011 AND T1.FullName = 'Molecular Brain' | 765 | simple |
simpson_episodes | Name all the person who involved in the making of simpson 20s episode that aired between October to November. | aired between October to November refers to strftime('%m', air_date) between '10' and '11'; | SELECT DISTINCT T2.person FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.air_date, 6, 2) BETWEEN '10' AND '11'; | 766 | moderate |
talkingdata | How many events were participated by the users at longitude of "-156"? | SELECT COUNT(event_id) FROM events WHERE longitude = -156 | 767 | simple |
|
soccer_2016 | What is the name of the youngest player? | name refers to Player_Name; youngest player refers to max(DOB) | SELECT Player_Name FROM Player ORDER BY DOB DESC LIMIT 1 | 768 | simple |
app_store | List out genre that have downloads more than 1000000000. | downloads and installs are synonyms; Installs = '1,000,000,000+'; | SELECT Genres FROM playstore WHERE Installs = '1,000,000,000+' GROUP BY Genres | 769 | simple |
movies_4 | How many animators does Movie No. 129 have? | animators refers to job = 'Animation'; Movie No. 129 refers to movie_id = 129 | SELECT COUNT(movie_id) FROM movie_crew WHERE movie_id = 129 AND job = 'Animation' | 770 | simple |
language_corpus | How many more times does the first word in the biwords pair "àbac-xinès" occur than the biwords pair itself? | àbac refers to word = 'àbac'; xinès refers to word = 'xinès'; How many more times the first word in the biwords occur than the biwords pair itself means SUBTRACT(words.occurrence, biwords.occurrences) | SELECT occurrences - ( SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'àbac' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'xinès' ) ) AS CALUS FROM words WHERE word = 'àbac' | 771 | moderate |
food_inspection_2 | Please list the full names of the sanitarians who did at least one inspection in May, 2010. | full name refers to first_name, last_name; in May 2010 refers to inspection_date like '2010-05%'; sanitarian refers to title = 'Sanitarian' | SELECT DISTINCT T1.first_name, T1.last_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE strftime('%Y-%m', T2.inspection_date) = '2010-05' AND T1.title = 'Sanitarian' | 772 | moderate |
beer_factory | What is the name of the root beer brand with the lowest unit profit available to wholesalers? | name of the root beer brand refers to BrandName; lowest unit profit available to wholesalers refers to MIN(SUBTRACT(CurrentRetailPrice, WholesaleCost)); | SELECT BrandName FROM rootbeerbrand ORDER BY CurrentRetailPrice - WholesaleCost LIMIT 1 | 773 | simple |
food_inspection | Who is the owner of the business that has a high risk violation of 103109 and described as unclean or unsanitary food contact surfaces? | owner refers to owner_name; high risk violation of 103109 and described as unclean or unsanitary food contact surfaces refers to risk_category = 'High Risk' where violation_type_id = 103109 and description = 'Unclean or unsanitary food contact surfaces'; | SELECT DISTINCT T2.owner_name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' AND T1.violation_type_id = 103109 AND T1.description = 'Unclean or unsanitary food contact surfaces' | 774 | moderate |
professional_basketball | What's the name of the player in 1996 who had the most steals that didn't play in the playoffs? | name of the player refers to first_name, middle_name, last_name; in 1996 refers to year = 1996; the most steals refers to max(steals); didn't play in the playoffs refers to playoff = null | SELECT T1.playerID FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1996 AND T2.PostGP = 0 ORDER BY T2.steals DESC LIMIT 1 | 775 | simple |
shakespeare | Give the title of the work that contains the character "Shylock". | character "Shylock" refers to CharName = 'Shylock' | SELECT DISTINCT T1.Title FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T4.CharName = 'Shylock' | 776 | simple |
university | How many criteria are associated with ranking system Center for World University Rankings? | ranking system Center for World University Rankings refers to system_name = 'Center for World University Rankings'; | SELECT COUNT(T2.criteria_name) FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T1.system_name = 'Center for World University Rankings' | 777 | simple |
law_episode | Which role did Joseph Blair play in the show? | SELECT T1.role FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T2.name = 'Joseph Blair' | 778 | simple |
|
address | List down the country of the cities with a population greater than 97% of the average population of all countries in 2020. | population_2020 > MULTIPLY(0.97, AVG(population_2020)); | SELECT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.population_2020 > 0.97 * ( SELECT AVG(population_2020) FROM zip_data ) | 779 | simple |
college_completion | Please list the names of the institutes in the state of Alabama whose all graduates in total exceeded 500 in 2011? | names of the institutes refers to chronname; graduates refers to grad_cohort; grad_cohort > 500; in 2011 refers to year = 2011; all students refer to race = 'X'. | SELECT DISTINCT T1.chronname FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.state = 'Alabama' AND T2.year = 2011 AND T2.race = 'X' AND T2.grad_cohort > 500 | 780 | moderate |
world_development_indicators | Please list the countries under the lending category of the International Development Associations and have a external debt reporting finished by estimation. | countries refer to the ShortName; International Development Associations refers to lendingcategory = 'IDA'; have a external debt reporting finished by estimation refers to ExternalDebtReportingStatus = 'Estimate' | SELECT ShortName, ExternalDebtReportingStatus FROM Country WHERE LendingCategory = 'IDA' | 781 | simple |
address | Which state has the most bad aliases? | the most bad aliases refer to MAX(COUNT(bad_alias)); | SELECT T2.state FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.state ORDER BY COUNT(T1.bad_alias) DESC LIMIT 1 | 782 | simple |
disney | The song "Once Upon a Dream" is associated with the movie directed by whom? | directed by whom refers to director; movie refers to movie_title; | SELECT T2.director FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T1.song = 'Once Upon a Dream' | 783 | simple |
works_cycles | What is the name of the territory assigned to the sales person with business id "277"? | business id refers to BusinessEntityID | SELECT T2.Name FROM SalesPerson AS T1 INNER JOIN SalesTerritory AS T2 ON T1.TerritoryID = T2.TerritoryID WHERE T1.BusinessEntityID = 277 | 784 | simple |
human_resources | Mention the full name, hired date and performance status of the employee whose location is in Utah state. | full name = firstname, lastname; Utah refers to state = 'UT' | SELECT T1.firstname, T1.lastname, T1.hiredate, T1.performance FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.state = 'UT' | 785 | simple |
synthea | Who is the patient with a body weight of 61.97 kg? | body weight of 61.97 kg refers to observations.DESCRIPTION = 'Body Weight' AND observations.VALUE = 61.97; observations.UNITS = 'kg' | SELECT T2.first, T2.last FROM observations AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Body Weight' AND T1.UNITS = 'kg' AND T1.VALUE = 61.97 | 786 | simple |
coinmarketcap | What was the average price of a Bitcoin in the year 2013? | average price refers SUM(price)/COUNT(named = 'Bitcoin'); in the year 2013 refers to year(date) = 2013 | SELECT AVG(T2.price) FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE STRFTIME('%Y', T2.date) = '2013' AND T1.name = 'Bitcoin' | 787 | simple |
chicago_crime | What is the district address associated with the case JB107731? | case JB107731 refers to case_number = 'JB107731' | SELECT T1.address FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no WHERE T2.case_number = 'JB107731' | 788 | simple |
codebase_comments | How many stars does the repository of the solution No. 45997 have? | repository of solution no. refers to Id | SELECT T1.Stars FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 45997 | 789 | simple |
simpson_episodes | How many episodes have won the award for Outstanding Animated Program (Programming Under One Hour) with less than 100 votes? Calculate the percentage of episodes with less than 100 votes out of total episodes. | less than 100 votes refers to votes < 100; percentage refers to DIVIDE(COUNT(episode_id when votes < 100), COUNT(episode_id)) * 100% | SELECT SUM(CASE WHEN T2.votes < 100 THEN 1 ELSE 0 END) AS num , CAST(SUM(CASE WHEN T2.votes < 100 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Award AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Episode AS T3 ON T1.episode_id = T3.episode_id WHERE T1.award = 'Outstanding Animated Program (For Programming Less Than One Hour)'; | 790 | challenging |
software_company | Calculate the number of customers who did not respond in February of 2007. | did not respond refers to RESPONSE = 'false'; February of 2007 refers to REF_DATE BETWEEN '2007-02-01 12:00:00.0'AND '2007-02-28 12:00:00.0'; | SELECT COUNT(REFID) custmoer_number FROM Mailings1_2 WHERE RESPONSE = 'false' AND REF_DATE BETWEEN '2007-02-01' AND '2007-02-28' | 791 | simple |
superstore | Name the item ordered by Jonathan Doherty with the highest quantity in the East region. | Jonathan Doherty is the "Customer Name"; highest quantity refers to MAX(Quantity); Region = 'East' | SELECT T3.`Product Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Jonathan Doherty' AND T2.Region = 'East' ORDER BY T1.Quantity DESC LIMIT 1 | 792 | moderate |
hockey | List all goalies with more lost than won games for two seasons or more. State the name of the player and team he played. | lost refers to L; won refers to W | SELECT DISTINCT T1.firstName, T1.lastName, T3.name FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T2.year = T3.year AND T2.tmID = T3.tmID WHERE T1.pos = 'G' AND T2.L > T2.W GROUP BY T1.firstName, T1.lastName, T3.name HAVING COUNT(T3.year) > 2 | 793 | challenging |
public_review_platform | Under the attribute name of "music_playlist", describe the attribute ID, business ID, city and inactive status. | active status refers to active; active = 'true' means the business is still running; active = 'false' means the business is inactive or not running now | SELECT T1.attribute_id, T2.business_id, T3.city FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.attribute_name = 'music_playlist' AND T3.active = 'false' | 794 | moderate |
regional_sales | Please list the id and detailed position of all stores in Birmingham city. | Latitude and Longitude coordinates can be used to identify the detailed position of stores; id refers to StoreID; | SELECT StoreID, Latitude, Longitude FROM `Store Locations` WHERE `City Name` = 'Birmingham' | 795 | simple |
movie_platform | List all movies rated by user 39115684. State the title, rating date and rating score. | user 39115684 refers to user_id = 39115684; title refers to movie_title; rating date refers to rating_timestamp_utc
| SELECT T2.movie_title, T1.rating_timestamp_utc, T1.rating_score FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 39115684 | 796 | simple |
books | Which book has the most number of pages? | books with the most number of pages refers to Max(num_pages) | SELECT title FROM book ORDER BY num_pages DESC LIMIT 1 | 797 | simple |
beer_factory | Show the credit card number of Lisa Ling. | FALSE; | SELECT DISTINCT T2.CreditCardNumber FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Lisa' AND T1.Last = 'Ling' | 798 | simple |
superstore | Among the customers from Chicago, Illinois, what is the highest quantity of products bought in a single order? | from Chicago refers to City = 'Chicago'; Illinois refers to State = 'Illinois'; highest quantity refers to max(Quantity) | SELECT T1.Quantity FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN central_superstore AS T3 ON T3.`Customer ID` = T2.`Customer ID` INNER JOIN south_superstore AS T4 ON T4.`Customer ID` = T3.`Customer ID` INNER JOIN people AS T5 ON T5.`Customer ID` = T4.`Customer ID` WHERE T5.City = 'Chicago' AND T5.State = 'Illinois' ORDER BY T1.Quantity DESC LIMIT 1 | 799 | moderate |
Subsets and Splits