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 |
---|---|---|---|---|---|
simpson_episodes | Who produced The simpson 20s: Season 20? | produced refers to role = 'producer' | SELECT DISTINCT person FROM Credit WHERE role = 'producer'; | 200 | simple |
public_review_platform | How many more "Chinese" than "Filipino" Yelp businesses? | Chinese refers to category_name = 'Chinese'; Filipino refers to category_name = 'Filipino'; how many more = SUBTRACT(SUM(category_name = 'Chinese'), SUM(category_name = 'Filipino')); | SELECT SUM(CASE WHEN T1.category_name LIKE 'Chinese' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.category_name LIKE 'Filipino' THEN 1 ELSE 0 END) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id | 201 | simple |
professional_basketball | How many awards were given out in 2010 to players who attended high school in Chicago? | in 2010 refers to year = 2010; attended high school in Chicago refers to college = 'Chicago' | SELECT COUNT(T1.award) FROM awards_players AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID WHERE T1.year = 2010 AND T2.hsCity = 'Chicago' | 202 | simple |
beer_factory | What is the name of the root beer brand that has the longest history? | name of the root beer brand refers to BrandName; longest history refers to MIN(FirstBrewedYear); | SELECT BrandName FROM rootbeerbrand WHERE FirstBrewedYear = ( SELECT MIN(FirstBrewedYear) FROM rootbeerbrand ) | 203 | simple |
mondial_geo | Which two countries have the border in length of 803 km? Give the full names of the countries. | SELECT T1.Name, T3.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 INNER JOIN country AS T3 ON T3.Code = T2.Country2 WHERE T2.Length = 803 | 204 | simple |
|
retail_world | Mention the oldest empoyee's full name, title, salary and number of orders which were shipped to USA by him. | full name refers to FirstName, LastName; shipped to USA refers to ShipCountry = 'USA' | SELECT T1.FirstName, T1.LastName, T1.Title, T1.Salary , COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE ShipCountry = 'USA' GROUP BY T1.FirstName, T1.LastName, T1.Title, T1.Salary, T1.BirthDate ORDER BY T1.BirthDate LIMIT 1 | 205 | moderate |
language_corpus | Among the wikipedia pages on Catalan with more than 300 different words, how many of them have a revision ID of over 28330000? | lid = 1 means it's Catalan language; more than 300 different words refers to words > 300; revision ID of over 28330000 refers to revision > 28330000 | SELECT COUNT(lid) FROM pages WHERE lid = 1 AND words > 300 AND revision > 28330000 | 206 | simple |
retail_world | What are the territory descriptions of territories in the Eastern region? | in the Eastern region refers to RegionDescription = 'Eastern' | SELECT DISTINCT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern' ORDER BY T1.TerritoryDescription | 207 | simple |
student_loan | Find the percentage of male students enlisted in the fire department. | percentage refers to DIVIDE(COUNT(organ = 'fire_department'), COUNT(name)) | SELECT CAST(COUNT(T2.name) AS REAL) * 100 / COUNT(T1.name) FROM enlist AS T1 LEFT JOIN male AS T2 ON T1.name = T2.name WHERE T1.organ = 'fire_department' | 208 | simple |
mondial_geo | State the country and its population with population growth greater than 2% but infant mortality rate less than 5%. | SELECT T1.Name, T1.Population FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country WHERE T2.Population_Growth > 2 AND T2.Infant_Mortality < 5 | 209 | simple |
|
shakespeare | In "Twelfth Night, Or What You Will", what is the description of the chapter in 2nd scene, Act 2? | "Twelfth Night, Or What You Will" refers to LongTitle = 'Twelfth Night, Or What You Will'; 2nd scene refers to Scene = 2 | SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.LongTitle = 'Twelfth Night, Or What You Will' AND T2.Scene = 2 AND T2.Act = 2 | 210 | moderate |
simpson_episodes | What are the keywords for episode 426 of the series? | episode 426 refers to number_in_series = 426 | SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.number_in_series = 426; | 211 | simple |
works_cycles | Please list the email adresses of the reviewers who have given the lowest rating to the product HL Mountain Pedal. | lowest rating refers to Rating = 1 | SELECT T1.EmailAddress FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'HL Mountain Pedal' ORDER BY T1.Rating LIMIT 1 | 212 | simple |
synthea | How many patients have the most prevalent conditions? | the most prevalent conditions refer to MAX(PREVALENCE RATE); | SELECT COUNT(DISTINCT T2.patient) FROM all_prevalences AS T1 INNER JOIN conditions AS T2 ON lower(T1.ITEM) = lower(T2.DESCRIPTION) ORDER BY T1."PREVALENCE RATE" DESC LIMIT 1 | 213 | simple |
retail_complains | Please list all clients' phone numbers and complaint IDs which are still in progress. | in progress refers to Company response to consumer = 'In progress' | SELECT T1.phone, T2.`Complaint ID` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Company response to consumer` = 'In progress' | 214 | simple |
regional_sales | What is the average unit price of a Cookware product? | AVG(Unit Price where Product Name = 'Cookware'); | SELECT AVG(REPLACE(T1.`Unit Price`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Cookware' | 215 | simple |
legislator | List all the representatives in 1789 along with the districts and state. | representatives refers to type = 'rep'; in 1789 refers to start like '1789%'; | SELECT T2.district, T2.state FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.start LIKE '1789%' | 216 | simple |
world_development_indicators | What are the footnote description of Finland in year 2000? | Finland is the short name of the country; year 2000 refers to Year = 'YR2000'; | SELECT DISTINCT T2.Description FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.TableName = 'Finland' AND T2.Year = 'YR2000' | 217 | simple |
menu | Among the menus in which the dish "Clear green turtle" had appeared, how many of them used the dollar as their currency? | Clear green turtle is a name of dish; dollar as currency refers to currency = 'Dollars'; | SELECT SUM(CASE WHEN T3.currency = 'Dollars' THEN 1 ELSE 0 END) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T4.name = 'Clear green turtle' | 218 | challenging |
mondial_geo | Among the countries with more than 3% population growth rate, state the country name in full along with its GDP. | Population_growth = 3 means 3% population growth rate | SELECT T1.Name, T3.GDP FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country INNER JOIN economy AS T3 ON T3.Country = T2.Country WHERE T2.Population_Growth > 3 | 219 | simple |
world_development_indicators | How many countries are having their country's footnotes described as "unspecified"? Please provide the full names of any three of those countries. | described as "unspecified" refers to Description = 'Not specified'; full names refers to LongName | SELECT COUNT(DISTINCT T1.CountryCode) FROM Country AS T1 INNER JOIN Footnotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Unspecified' OR T2.Description = 'Not specified' UNION SELECT T1.LongName FROM Country AS T1 INNER JOIN Footnotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Unspecified' OR T2.Description = 'Not specified' LIMIT 4 | 220 | challenging |
shakespeare | Calculate the percentage of paragraphs in all chapters of "All's Well That Ends Well". | "All's Well That Ends Well" refers to Title = 'All's Well That Ends Well'; percentage = divide(sum(paragraphs.id) when Title = 'All's Well That Ends Well', count(paragraphs.id)) as percentage | SELECT CAST(SUM(IIF(T1.Title = 'All''s Well That Ends Well', 1, 0)) AS REAL) * 100 / COUNT(T3.id) 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 | 221 | moderate |
car_retails | List out 3 customer numbers who have highest amount payment | amount of payment refers to amount; | SELECT customerNumber FROM payments ORDER BY amount DESC LIMIT 3 | 222 | simple |
public_review_platform | How many businesses in Arizona having an average review less than 3 stars? | businesses in Arizona refer to business_id where state = 'Arizona'; average review less than 3 stars refers to AVG(review_stars) < 3.0; | SELECT COUNT(business_id) FROM Business WHERE business_id IN ( SELECT DISTINCT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.state = 'AZ' GROUP BY T1.business_id HAVING SUM(T2.review_stars) / COUNT(T2.user_id) < 3 ) | 223 | simple |
books | How many of the customer addresses are inactive? | addresses are inactive refers to address_status = 'Inactive' | SELECT COUNT(*) FROM customer_address AS T1 INNER JOIN address_status AS T2 ON T1.status_id = T2.status_id WHERE T2.address_status = 'Inactive' | 224 | simple |
works_cycles | What is the name style of the employee with the lowest pay rate? | lowest pay rate refers to Min(Rate); | SELECT T2.NameStyle FROM EmployeePayHistory AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.Rate IS NOT NULL ORDER BY T1.Rate ASC LIMIT 1 | 225 | simple |
computer_student | How many basic or medium undergraduate courses are taught by a professor? | basic or medium undergraduate courses refers to courseLevel = 'Level_300'; professor refers to professor = 1 | SELECT COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T1.courseLevel = 'Level_300' AND T3.professor = 1 | 226 | simple |
ice_hockey_draft | Who is the oldest player that participated in OHL league in the 1997 - 2000 season? | oldest player refers to MIN(birthdate); OHL league refers to LEAGUE = 'OHL'; 1997-2000 season refers to SEASON = '1997-2000'; | SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.LEAGUE = 'OHL' AND T2.SEASON = '1999-2000' ORDER BY T1.birthdate LIMIT 1 | 227 | simple |
food_inspection | What is the average scores of Tiramisu Kitchen in all inspections? | avg(score); | SELECT AVG(T1.score) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Tiramisu Kitchen' | 228 | simple |
image_and_language | Give the object number of the sample which has the relationship of "lying on" with object sample no.1 from image no.2345524. | object number of the sample refers to OBJ1_SAMPLE_ID; object sample no.1 from image no.2345524 refers to OBJ2_SAMPLE_ID = 1 and IMG_ID = 2345524 | SELECT T2.OBJ1_SAMPLE_ID FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 2345524 AND T1.PRED_CLASS = 'lying on' AND T2.OBJ2_SAMPLE_ID = 1 | 229 | moderate |
cs_semester | List the course's name where students acquired a grade of D. | SELECT T1.name FROM course AS T1 INNER JOIN registration AS T2 ON T1.course_id = T2.course_id WHERE T2.grade = 'D' | 230 | simple |
|
works_cycles | How many products with the id "989" were sold in August 2013? | TransactionDate BETWEEN '2013-08-01' AND '2013-08-30'; sold in refers to TransactionType = 'S' which means SalesOrder; | SELECT SUM(Quantity) FROM TransactionHistory WHERE TransactionDate LIKE '2013-08%' AND TransactionType = 'S' AND ProductID = 989 | 231 | simple |
language_corpus | Please list any three Wikipedia pages that are written in Catalan, together with their titles and revision page numbers. | in Catalan means in Catalan-language and refers to lid = 1; revision page numbers refer to revision; | SELECT title, revision FROM pages WHERE lid = 1 LIMIT 3 | 232 | simple |
student_loan | How many unemployed students filed for bankruptcy? | unemployed students who filed for bankruptcy refers to unemployed.name who are IN filed_for_bankrupcy.name; | SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T2.name = T1.name | 233 | simple |
food_inspection_2 | Provide the names and inspection results of the facilities located in Burnham. | names refers to dba_name; inspection result refers to results; in Burnham refers to city = 'BURNHAM' | SELECT DISTINCT T1.dba_name, T2.results FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.city = 'BURNHAM' | 234 | simple |
synthea | Among the patients that died, what is the condition of the oldest patient? | if deathdate is not null, it means this patient died; condition refers to DESCRIPTION from conditions; the oldest patient refers to MAX(SUBTRACT(strftime('%Y', deathdate), strftime('%Y', birthdate))); | SELECT T1.DESCRIPTION FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.deathdate IS NOT NULL ORDER BY strftime('%Y', T2.deathdate) - strftime('%Y', T2.birthdate) DESC LIMIT 1 | 235 | moderate |
menu | On the menu with the most dishes, how many dishes were there on its second page? | menu with the most dishes refers to menu.id with MAX(dish_count); second page refers to page_number = 2; | SELECT COUNT(T1.dish_id) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id WHERE T2.page_number = 2 GROUP BY T3.name ORDER BY T3.dish_count DESC LIMIT 1 | 236 | moderate |
law_episode | How many awards did the "Agony" win? | the "Agony" refers to title = 'Agony'; win refers to result = 'Winner' | SELECT COUNT(T2.award) FROM Episode AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Agony' AND T2.result = 'Winner' | 237 | simple |
works_cycles | How many discount are of the type "Excess Inventory"? | discount refers to DiscountPct; Excess Inventory is a type of special offer; | SELECT COUNT(SpecialOfferID) FROM SpecialOffer WHERE Type = 'Excess Inventory' | 238 | simple |
chicago_crime | Which district had the most number of first degree murders? Give the district number. | the most number refers to max(count(case_number)); first degree murder refers to secondary_description = 'FIRST DEGREE MURDER'; district number refers to district_no | SELECT T2.district_no FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T1.secondary_description = 'FIRST DEGREE MURDER' GROUP BY T2.district_no ORDER BY COUNT(*) DESC LIMIT 1 | 239 | simple |
works_cycles | What is the stocked quantity of products manufactured from location ID 40? | Stocked quantity refers to StockedQty | SELECT COUNT(*) FROM WorkOrderRouting AS T1 INNER JOIN BillOfMaterials AS T2 ON T1.LocationID = T2.ProductAssemblyID INNER JOIN WorkOrder AS T3 ON T3.WorkOrderID = T1.WorkOrderID WHERE T1.LocationID = 40 | 240 | simple |
retail_complains | In 2014, what is the percentage of complaints from consumers in Houston that the delay was over 5 days? | in 2014 refers to Date received LIKE'2014%'; Houston refers to city = 'Houston'; delay over 5 days refers to subtract(Date sent to company, Date received) > 5; percentage = divide(count(Complaint ID where subtract(Date sent to company , Date received) > 5) , count(Complaint ID)) * 100% | SELECT CAST((SUM(CASE WHEN strftime('%J', T2.`Date sent to company`) - strftime('%J', T2.`Date received`) > 5 THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.city = 'Houston' AND strftime('%Y', T2.`Date received`) = '2014' | 241 | challenging |
disney | Among the movies released from 2001 to 2005, list down the titles and directors of the movies which had a total gross of more than 100% above the average. | Released from 2001 to 2005 refers to substr(release_date, length(release_date) - 3, length(release_date)) between '2001' and '2005'; DIVIDE(SUM(total_gross), COUNT(movie_title)); | SELECT T2.name, T2.director FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE SUBSTR(T1.release_date, LENGTH(T1.release_date) - 3, LENGTH(T1.release_date)) BETWEEN '2001' AND '2005' AND CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) / ( SELECT SUM(CAST(REPLACE(trim(T3.total_gross, '$'), ',', '') AS REAL)) / COUNT(T3.movie_title) AS avg_gross FROM movies_total_gross AS T3 INNER JOIN director AS T4 ON T3.movie_title = T4.name WHERE SUBSTR(T3.release_date, LENGTH(T3.release_date) - 3, LENGTH(T3.release_date)) BETWEEN '2001' AND '2005' ) - 1 > 1 | 242 | challenging |
university | What is the percentage of the international students in University of Oslo in 2015? | percentage of the international students refers to pct_international_students; in 2015 refers to year = 2015; in University of Oslo refers to university_name = 'University of Oslo'; | SELECT T2.pct_international_students FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id WHERE T1.university_name = 'University of Oslo' AND T2.year = 2015 | 243 | simple |
food_inspection | For the business which got the most number of violations, how many inspections did it have? | SELECT COUNT(T2.business_id) FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id GROUP BY T1.business_id ORDER BY COUNT(T1.business_id) DESC LIMIT 1 | 244 | simple |
|
video_games | In which year was Panzer Tactics released on DS? | year refers to release_year; Panzer Tactics refers to game_name = 'Panzer Tactics'; on DS refers to platform_name = 'DS' | SELECT T4.release_year FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN game AS T3 ON T1.game_id = T3.id INNER JOIN game_platform AS T4 ON T1.id = T4.game_publisher_id INNER JOIN platform AS T5 ON T4.platform_id = T5.id WHERE T3.game_name = 'Panzer Tactics' AND T5.platform_name = 'DS' | 245 | moderate |
world_development_indicators | Please list the indicator names belonging to Education: Inputs topic in 2000. | Year = 'YR2000'; | SELECT DISTINCT T2.IndicatorName FROM Footnotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode WHERE T1.Year = 'YR2000' AND T2.Topic = 'Education: Inputs' | 246 | simple |
music_tracker | Among the releases with the tag "1980s", which one of them is the most downloaded? Please give its title. | title refers to groupName; the most downloaded refers to MAX(totalSnatched); | SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s' ORDER BY T1.totalSnatched DESC LIMIT 1 | 247 | simple |
retail_world | Calculate the production volume of the dairy product 'Mascarpone Fabioli'. | 'Mascarpone Fabioli' is a ProductName; calculation = SUM(UnitsInStock, UnitsOnOrder) | SELECT SUM(UnitsInStock + UnitsOnOrder) FROM Products WHERE ProductName = 'Mascarpone Fabioli' | 248 | simple |
student_loan | How many students enlist in the air force organization? | organization refers to organ; organ = 'air_force'; | SELECT COUNT(name) FROM enlist WHERE organ = 'air_force' | 249 | simple |
mental_health_survey | How many respondents who participated in the survey in 2014 work remotely at least 50% of the time? | respondents' and 'users' are synonyms; work remotely at least 50% of the time refers to AnswerText(SurveyID = 2014& QuestionID = 93) = 'Yes' | SELECT COUNT(T1.AnswerText) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T1.QuestionID = 93 AND T1.SurveyID = 2014 AND T1.AnswerText = 'Yes' | 250 | simple |
legislator | Give the alphanumeric ID of the Catholic legislators in Nebraska. | alphanumeric ID refers to bioguide; Catholic legislators refers to religion_bio = 'Catholic'; Nebraska refers to state = 'NE'; | SELECT T1.bioguide FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.religion_bio = 'Catholic' AND T1.state = 'NE' | 251 | simple |
hockey | Among the coaches whose team has over 30 wins in a year, how many of them are born in the USA? | over 30 wins refers to w>30; born in the USA refers to birthCountry = 'USA' | SELECT COUNT(T2.coachID) FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.W > 30 AND T1.birthCountry = 'USA' | 252 | simple |
video_games | In which platform does the game titled 15 Days available? | platform refers to platform_name; the game titled 15 Days refers to game_name = '15 Days' | SELECT T1.platform_name 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 INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T4.game_name = 'Counter Force' | 253 | moderate |
shakespeare | What is the paragraph number with plain text "This is Illyria, lady"? | paragraph number refers to ParagraphNum | SELECT ParagraphNum FROM paragraphs WHERE PlainText = 'This is Illyria, lady.' | 254 | simple |
retail_world | Indicate the address of the company Eastern Connection whose contact name is Ann Devon. | 'Eastern Connection' is a CompanyName; 'Ann Devon' is the full name of an employee; full name refers to FirstName, LastName | SELECT Address FROM Customers WHERE CompanyName = 'Eastern Connection' AND ContactName = 'Ann Devon' | 255 | simple |
retail_world | What are the products that are supplied by Aux joyeux ecclsiastiques? | Aux joyeux ecclsiastiques is the name of supply company; products refer to ProductName; | SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Aux joyeux ecclsiastiques' | 256 | simple |
world_development_indicators | What is the name of the country with the highest percentage of rural population in the overall total population? Indicate the rural population percentage of total population. | the highest percentage of rural population in the overall total population refers to max(value where indicatorname = 'Rural population (% of total population)') | SELECT countryname, MAX(value) FROM indicators WHERE indicatorname = 'Rural population (% of total population)' | 257 | simple |
retails | How many European suppliers are there? | European suppliers refer to s_suppkey where r_name = 'EUROPE'; | 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' | 258 | simple |
hockey | Which country has the most players in the Hall of Fame? | country refers to birthCountry | SELECT T1.birthCountry FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID GROUP BY T1.birthCountry ORDER BY COUNT(T1.playerID) DESC LIMIT 1 | 259 | simple |
movie_platform | Which of the films directed by Álex de la Iclesia is the most popular among Mubi users? | Alex de la Iclesia is the director name; the most popular refers to Max(movie_popularity); films refers to movies; | SELECT movie_title FROM movies WHERE director_name = 'Åke Sandgren' ORDER BY movie_popularity DESC LIMIT 1 | 260 | simple |
movie_platform | Was the user who created the list "250 Favourite Films" a trialist when he or she created the list? | the user was a trialist when he created the list refers to user_trailist = 1; 250 Favourite Films is list_title; | SELECT T2.user_trialist FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.list_title = '250 Favourite Films' | 261 | simple |
retail_complains | State the first name of male clients who did not receive timely response from the call center. | first name refers to first; male refers to sex = 'Male'; did not receive timely response refers to Timely response? = 'No' | SELECT T1.first FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'No' AND T1.sex = 'Male' | 262 | simple |
sales | Write down the name of products whose sale quantity is more than 950. | quantity is more than 950 refers to Quantity > 950; | SELECT DISTINCT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Quantity > 950 | 263 | simple |
chicago_crime | List the community area names in the Northwest. | the Northwest refers to side = 'Northwest' | SELECT community_area_name FROM Community_Area WHERE side = 'Northwest' | 264 | simple |
hockey | Which NHL award was most frequently won by the coach with the most wins? | SELECT award FROM Teams AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.lgID = T2.lgID WHERE T1.lgID = 'NHL' GROUP BY T2.coachID, T2.award ORDER BY COUNT(T2.award) DESC LIMIT 1 | 265 | simple |
|
university | Please list the names of the universities with a score in teaching of over 90 in 2011. | in 2011 refers to year 2011; in teaching refers to criteria_name = 'Teaching'; score in teaching of over 90 refers to score > 90; 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 > 90 | 266 | simple |
synthea | Provide the patients' full names who received the extraction of wisdom tooth. | patient's full name refers to first, last; extraction of wisdom tooth refers to DESCRIPTION = 'Extraction of wisdom tooth' from procedures; | SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Extraction of wisdom tooth' | 267 | simple |
retails | How many customers who are not in debt ordered an urgent order? | customers who are not in debt refer to c_custkey where c_acctbal > 0; the order is urgent if o_orderpriority = '1-URGENT' ; | SELECT COUNT(T2.c_custkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_acctbal > 0 AND T1.o_orderpriority = '1-URGENT' | 268 | simple |
retails | How much is the profit for smoke turquoise purple blue salmon that was delivered in person on 5/7/1996? | SUBTRACT(MULTIPLY(l_extendedprice, (SUBTRACT(1, l_discount)), MULTIPLY(ps_supplycost, l_quantity))) where p_name = 'smoke turquoise purple blue salmon' and l_receiptdate = '1996-05-07' and l_shipinstruct = 'DELIVER IN PERSON'; | SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity AS num FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey INNER JOIN part AS T3 ON T2.ps_partkey = T3.p_partkey WHERE T1.l_receiptdate = '1996-05-07' AND T1.l_shipinstruct = 'DELIVER IN PERSON' AND T3.p_name = 'smoke turquoise purple blue salmon' | 269 | moderate |
university | How many universities are located in Japan? | located in Japan refers to country_name = 'Japan'; | SELECT COUNT(*) FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Japan' | 270 | simple |
food_inspection | What percentage of the violations for "Melody Lounge" are moderate risks? | DIVIDE(COUNT(risk_category = 'Moderate Risk' where name = 'Melody Lounge'), COUNT(business_id where name = 'Melody Lounge')) as percentage; | SELECT CAST(SUM(CASE WHEN T2.risk_category = 'Moderate Risk' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.business_id) FROM businesses AS T1 INNER JOIN violations AS T2 ON T1.business_id = T2.business_id WHERE T1.name = 'Melody Lounge' | 271 | moderate |
authors | What is the average number of papers published in the journal "Molecular Brain" every year from 2008 to 2011? | "Molecular Brain" is the FullName of journal; year from 2008 to 2011 refers to Year BETWEEN 2008 AND 2011; average = Divide (Count(Id),4) | SELECT CAST(COUNT(T2.Id) AS REAL) / COUNT(DISTINCT T2.Year) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'Molecular Brain' AND T2.Year BETWEEN 2008 AND 2011 | 272 | moderate |
works_cycles | To which group does the department with the least amount of workers belong to? Indicate the name of the department as well. | least amount of workers refers to MIN(count(DepartmentID)); | SELECT T2.GroupName FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.DepartmentID = T2.DepartmentID GROUP BY T2.GroupName ORDER BY COUNT(T1.BusinessEntityID) LIMIT 1 | 273 | simple |
movielens | Among the action movies from the USA, how many of them are not in English? | USA is a country; not in English can be represented by isEnglish = 'F' | SELECT COUNT(T1.movieid) FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'USA' AND T1.isEnglish = 'F' AND T2.genre = 'Action' | 274 | moderate |
talkingdata | For the event which happened at 23:55:16 on 2016/5/7, in the location coordinate(113, 28), on what device did it happen? Give the name of the device model. | at 23:55:16 on 2016/5/7 refers to timestamp = '2016/5/7 23:55:16'; location coordinate (113, 28) refers to longitude = '113' AND latitude = '28'; | SELECT T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN events AS T2 ON T1.device_id = T2.event_id WHERE T2.longitude = '113' AND T2.latitude = '28' AND T2.timestamp = '2016-05-07 23:55:16' | 275 | moderate |
computer_student | Provide the ID of professors who teach in both harder undergraduate course and master/graduate courses. | harder undergraduate course refers to courseLevel = 'Level_400'; master/graduate courses refers to courseLevel = 'Level_500'; ID of professors refers to taughtBy.p_id | SELECT DISTINCT T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_400' OR T1.courseLevel = 'Level_500' | 276 | moderate |
soccer_2016 | What is the city of M Chinnaswamy Stadium? | city refers to City_Name; M Chinnaswamy Stadium refers to Venue_Name = 'M Chinnaswamy Stadium' | SELECT T1.City_Name FROM City AS T1 INNER JOIN Venue AS T2 ON T2.City_Id = T1.City_Id WHERE T2.Venue_Name = 'M Chinnaswamy Stadium' | 277 | simple |
olympics | Please list the names of all the Olympic competitors from Finland. | names of competitors refer to full_name; from Finland refers to region_name = 'Finland'; | SELECT T3.full_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 T1.region_name = 'Finland' | 278 | simple |
airline | What are the names of the top 5 airlines with the highest number of aircraft? | names of the airlines refers to Description; highest number of aircraft refers to MAX(COUNT(TAIL_NUM)); | SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code GROUP BY T2.Description ORDER BY T1.TAIL_NUM DESC LIMIT 5 | 279 | simple |
retail_complains | State the full name of clients with server time of 20 minutes and above. | full name refers to first, middle, last; server time of 20 minutes and above refers to ser_time > '00:20:00' | SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE strftime('%M', T2.ser_time) > '20' | 280 | simple |
menu | What is the highest price of dishes with menu item ID 1 to 5? | highest price refers to MAX(price); menu item ID 1 to 5 refers to MenuItem.id BETWEEN 1 AND 5; | SELECT T2.price FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.id BETWEEN 1 AND 5 ORDER BY T2.price DESC LIMIT 1 | 281 | simple |
works_cycles | How many employees in the Information Service department work the evening shift? | Information Service is a name of department; | SELECT COUNT(T2.BusinessEntityID) FROM Department AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.DepartmentID = T2.DepartmentID INNER JOIN Shift AS T3 ON T2.ShiftId = T3.ShiftId WHERE T1.Name = 'Information Services' AND T3.Name = 'Evening' | 282 | simple |
codebase_comments | Please provide the path of solution of method whose tokenized name is html parser feed. | path of solution refers to Path; method refers to Name; tokenized name refers to NameTokenized; Name = ''html parser feed'; | SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'html parser feed' | 283 | simple |
codebase_comments | Give the number of solutions that the repository which has 3060 Stars contains. | solutions refers to Solution.Id; repository refers to Repository.Id; | SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = 3060 | 284 | simple |
ice_hockey_draft | What are the names of the players who played for Acadie-Bathurst Titan during the regular season in 1998-1999? | names of the players refers to PlayerName; played for Acadie-Bathurst Titan refers to TEAM = 'AcadieandBathurst Titan'; regular season refers to GAMETYPE = 'Regular Season'; in 1998-1999 refers to SEASON = '1998-1999'; | SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1998-1999' AND T1.GAMETYPE = 'Regular Season' AND T1.TEAM = 'Acadie-Bathurst Titan' | 285 | moderate |
simpson_episodes | In which country was the winner of the Outstanding Voice-Over Performance award of 2009 born? | "Outstanding Voice-Over Performance" is the award; 2009 refers to year = 2009; 'Winner' is the result; country refers to birth_country | SELECT T1.birth_country FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.award = 'Outstanding Voice-Over Performance' AND T2.year = 2009 AND T2.result = 'Winner'; | 286 | moderate |
synthea | List the procedures received by Emmy Waelchi. | procedures refer to DESCRIPTION from procedures; | SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Emmy' AND T1.last = 'Waelchi' | 287 | simple |
language_corpus | What is the title of Catalan language wikipedia page with revision page id '16203226'? | revision page id '16203226' refers to revision = 16203226 | SELECT title FROM pages WHERE revision = 16203226 | 288 | simple |
regional_sales | How many online purchases did Ole Group make in May 2019? | "Ole Group" is the Customer Names; online purchase refers to Sales Channel = 'Online'; made in May 2019 refers to OrderDate LIKE '5/%/19' | SELECT SUM(CASE WHEN T1.`Sales Channel` = 'Online' AND T2.`Customer Names` = 'Ole Group' AND T1.OrderDate LIKE '5/%/19' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID | 289 | moderate |
app_store | What is the rating of Dragon Ball Legends and how many users dislike this App? | Dragon Ball Legends is the app; users who dislikes the app refers to Sentiment_Polarity<-0.5; | SELECT T1.Rating, COUNT(T2.Sentiment_Polarity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Dragon Ball Legends' AND CAST(Sentiment_Polarity AS INTEGER) < -0.5 | 290 | moderate |
soccer_2016 | How many matches are there in 2008? | in 2008 refers to Match_Date like '2008%' | SELECT COUNT(Match_Id) FROM `Match` WHERE Match_Date LIKE '2008%' | 291 | simple |
music_tracker | Which album title and tag that millie jackson released in 1980? | millie jackson is an artist; album title refers to groupName where releaseType = 'album'; groupYear = 1980; | SELECT T1.groupName, T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear = 1980 AND T1.artist LIKE 'millie jackson' AND T1.releaseType LIKE 'album' | 292 | simple |
social_media | Give the location id of West Sussex State. | SELECT DISTINCT LocationID FROM location WHERE State = 'West Sussex' | 293 | simple |
|
college_completion | What is the name of the school with the highest difference in the average completion rate for the national in which it belongs? Indicate the state appropriations to higher education in fiscal year 2011 per resident to which the school belongs. | name of the school refers to chronname; highest difference in the average completion rate for the national in which it belongs = MAX(SUBTRACT(awards_per_value, awards_per_natl_value)); state appropriations to higher education in fiscal year 2011 per resident to which the school belongs refers to state_appr_value; | SELECT T1.chronname, T2.state_appr_value FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state ORDER BY T1.awards_per_value - T2.awards_per_natl_value DESC LIMIT 1 | 294 | moderate |
retail_world | How many female employees are in charge of 3 or more territories? | female employees refers to TitleOfCourtesy = 'Mrs.' or TitleOfCourtesy = 'Ms.'; in charge of 3 or more territories refers to TerritoryID > = 3; | SELECT COUNT(EID) FROM ( SELECT T1.EmployeeID AS EID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.TitleOfCourtesy IN ('Ms.' OR 'Mrs.') GROUP BY T1.EmployeeID HAVING COUNT(T2.TerritoryID) >= 3 ) T1 | 295 | moderate |
sales_in_weather | How many units of item no.5 were sold in store no.3 in total on days with a total precipitation of over 0.05? | item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; with a total precipitation of over 0.05 refers to preciptotal > 0.05 | SELECT SUM(CASE WHEN T3.preciptotal > 0.05 THEN units ELSE 0 END) AS sum FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T1.item_nbr = 5 | 296 | challenging |
bike_share_1 | How many bike stations were installed in San Jose in 2014? Indicate the names of the stations. | San Jose is the name of the city; 2014 refers to installation_date between '1/1/2014' and '12/31/2014'; | SELECT SUM(CASE WHEN city = 'San Jose' AND SUBSTR(installation_date, -4) = '2014' THEN 1 ELSE 0 END) FROM station UNION SELECT name FROM station WHERE city = 'San Jose' AND SUBSTR(installation_date, -4) = '2014' | 297 | simple |
codebase_comments | How many XML format does the github address "https://github.com/dogeth/vss2git.git" have? | Xml format refers to CommentisXml, github address refers to Url; Url = 'https://github.com/dogeth/vss2git.git'; | SELECT COUNT(T3.CommentIsXml) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId INNER JOIN Method AS T3 ON T2.Id = T3.SolutionId WHERE T1.Url = 'https://github.com/dogeth/vss2git.git' AND T3.CommentIsXml = 1 | 298 | moderate |
legislator | Among the Independent senators that started their term in 2011 and onwards, what are the official full names of the senators that caucused with the Democrat? | Independent refers to party = 'Independent'; senators refers to type = 'sen'; started the term in 2011 and onwards refers to strftime('%Y', start) > = '2011'; caucused with the Democrat refers to caucus = 'Democrat'; | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Independent' AND strftime('%Y', T2.start) >= '2011' AND T2.type = 'sen' AND T2.caucus = 'Democrat' | 299 | moderate |