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 |
---|---|---|---|---|---|
mondial_geo | What is the average height of all mountains in Nepal? | Nepal is a province | SELECT AVG(T1.Height) FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain WHERE T2.Province = 'Nepal' | 5,900 | simple |
movies_4 | What is the keyword ID of the movie with the title of "Sin City"? | title of "Sin City" refers to title = 'Sin City' | SELECT T2.keyword_id FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'Sin City' | 5,901 | simple |
public_review_platform | Which actively running Yelp business in "Gilbert" has got the most reviews? Give the business id. | actively running business refers to active = 'true'; 'Gilbert' is the name of city; most review refers to review_count = 'Uber' | SELECT DISTINCT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.active = 'true' AND T1.city = 'Gilbert' AND T1.review_count = 'Uber' | 5,902 | moderate |
mental_health_survey | What is the rate of increase of users with a current mental disorder from 2019's survey to 2016's survey? | rate of increase = subtract(divide(count(SurveyID = 2019& QuestionID = 33& AnswerText = 'Yes'), count(SurveyID = 2019& QuestionID = 33)), divide(count(SurveyID = 2016& QuestionID = 33& AnswerText = 'Yes'), count(SurveyID = 2016& QuestionID = 33))) | SELECT CAST(( SELECT COUNT(T2.UserID) FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID = 2019 AND T1.questiontext LIKE 'Do you currently have a mental health disorder?' AND T2.AnswerText = 'Yes' ) - ( SELECT COUNT(T2.UserID) FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID = 2016 AND T1.questiontext LIKE 'Do you currently have a mental health disorder?' AND T2.AnswerText = 'Yes' ) AS REAL) * 100 / ( SELECT COUNT(T2.UserID) FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID = 2016 AND T1.questiontext LIKE 'Do you currently have a mental health disorder?' AND T2.AnswerText = 'Yes' ) | 5,903 | challenging |
works_cycles | What is the cost for the sports? | cost refers to StandardCost; | SELECT T2.StandardCost FROM Product AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE '%Sport%' | 5,904 | simple |
retail_complains | Who is the owner of the final phone number for the complaints on server "MORIAH" on 9/11/2013? | owner refers to first, middle, last; on 9/11/2013 refers to Date received = '2013-09-11' | SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.server = 'MORIAH' AND T2.`Date received` = '2013-09-11' | 5,905 | simple |
world_development_indicators | What are the Indicator names and aggregation methods when the topic is Economic Policy & Debt: Balance of payments: Capital & financial account? | SELECT IndicatorName, AggregationMethod FROM Series WHERE Topic = 'Economic Policy & Debt: Balance of payments: Capital & financial account' | 5,906 | simple |
|
shakespeare | In "A Lover's Complaint", what is the description of Act 1, Scene 1? | "A Lover's Complaint" refers to Title = 'A Lover''s Complaint' | SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'A Lover''s Complaint' | 5,907 | simple |
software_company | List the marital status of customers within the age of 40 to 60 that has the highest income among the group. | age of 40 to 60 refers to age BETWEEN 40 AND 60; the highest income refers to MAX(INCOME_K); | SELECT T1.MARITAL_STATUS FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.age >= 40 AND T1.age <= 60 ORDER BY T2.INCOME_K DESC LIMIT 1 | 5,908 | simple |
codebase_comments | How many percent more of the Forks for the repository of solution No.53546 than No.1502? | solution No. refers to Solution.Id; percentage = DIVIDE(MULTIPLY(SUBTRACT(SUM(Solution.Id = 53546), SUM(Solution.Id = 1502)), 100)), SUM(Solution.Id = 1502); | SELECT CAST(SUM(CASE WHEN T2.Id = 53546 THEN T1.Forks ELSE 0 END) - SUM(CASE WHEN T2.Id = 1502 THEN T1.Forks ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 1502 THEN T1.Forks ELSE 0 END) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId | 5,909 | challenging |
public_review_platform | List down the business ID with a star range from 3 to 5, located at Chandler. | businesses with a star range from 3 to 5 refers to stars BETWEEN 3 AND 5; Chandler is a city | SELECT business_id FROM Business WHERE stars >= 3 AND stars < 6 AND city = 'Chandler' | 5,910 | simple |
authors | Who is the author of the paper titled "Open Sourcing Social Solutions (Building Communities of Change)"? | 'Open Sourcing Social Solutions (Building Communities of Change)' is a title of the paper; author refers to PaperAuthor.Name | SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Open Sourcing Social Solutions (Building Communities of Change)' | 5,911 | simple |
student_loan | Which students that filed for bankruptcy are also in the foreign legion? | in the foreign legion refers to organ = 'foreign_legion'; | SELECT T2.name FROM enlist AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.`name` = T2.`name` WHERE T1.organ = 'foreign_legion' | 5,912 | simple |
world_development_indicators | How many countries have notes on the indicator Stocks traded, turnover ratio of domestic shares? | indicator Stocks traded, turnover ratio of domestic shares refers to IndicatorName = 'Stocks traded, turnover ratio of domestic shares (%)' | SELECT COUNT(T1.Countrycode) FROM CountryNotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode WHERE T2.IndicatorName = 'Stocks traded, turnover ratio of domestic shares (%)' | 5,913 | simple |
legislator | Give the district numbers with an Anti-Administration party. | SELECT district FROM `historical-terms` WHERE party = 'Anti-Administration' GROUP BY district | 5,914 | simple |
|
world | How many countries have a life expectancy of 75.1? | SELECT COUNT(*) FROM Country WHERE LifeExpectancy = 75.1 | 5,915 | simple |
|
image_and_language | What is the unique id number identifying the onion object class? | unique id number identifying refers to OBJ_CLASS_ID; onion object class refers to OBJ_CLASS = 'onion' | SELECT OBJ_CLASS_ID FROM OBJ_CLASSES WHERE OBJ_CLASS = 'onion' | 5,916 | simple |
chicago_crime | In which district have there been more intimidation-type crimes? | more intimidation-type crime refers to Max(Count(primary_description = 'INTIMIDATION')); district refers to district_name | SELECT T3.district_name FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T1.primary_description = 'INTIMIDATION' GROUP BY T3.district_name ORDER BY COUNT(T1.primary_description) DESC LIMIT 1 | 5,917 | moderate |
retails | Please list the order keys of all the orders that have more than 2 parts with a jumbo case container. | order key refers to l_orderkey; jumbo case container refers to p_container = 'JUMBO CASE'; more than 2 parts refers to count(l_partkey) > 2 | 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 | 5,918 | moderate |
public_review_platform | List the closing time and day of week of active businesses in Tempe with stars greater than the 70% of average age of star rating. | active businesses refers to active = 'true'; in Tempe refers to city = 'Tempe'; with stars greater than the 70% of average age of star rating refers to stars > DIVIDE(sum(stars), COUNT(business_id)) * 70% | SELECT T2.closing_time, T3.day_of_week FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city LIKE 'Tempe' AND T1.active LIKE 'TRUE' AND T1.stars > 0.7 * ( SELECT AVG(T1.stars) FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city LIKE 'Tempe' AND T1.active LIKE 'TRUE' ) | 5,919 | challenging |
retail_world | How many kinds of products are there in the the category of "dairy products"? | kinds of products refers to ProductID; category refers to CategoryName; | SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Dairy Products' | 5,920 | simple |
synthea | What drug is administered more often to treat child attention deficit disorder? | drug that was administered refers to medications.DESCRIPTION; child attention deficit disorder refers to medications.REASONDESCRIPTION = 'Child attention deficit disorder'; | SELECT DESCRIPTION FROM medications WHERE REASONDESCRIPTION = 'Child attention deficit disorder' GROUP BY DESCRIPTION ORDER BY COUNT(DESCRIPTION) DESC LIMIT 1 | 5,921 | simple |
mondial_geo | What is the population density of the Petropavl's home country? | Population density = Population / area | SELECT CAST(T1.Population AS REAL) / T1.Area FROM country AS T1 INNER JOIN city AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'Petropavl' | 5,922 | simple |
retail_complains | Please list the full names of all the male clients born after the year 1990. | full names = first, middle, last; male refers to sex = 'Male'; year > 1990; | SELECT first, middle, last FROM client WHERE year > 1990 | 5,923 | simple |
retail_world | How many orders were shipped via Federal Shipping? | 'Federal Shipping' is a CompanyName; orders refers to OrderID | SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping' AND T1.ShipVia = 3 | 5,924 | simple |
software_company | Give the level of education and occupation of customers ages from 20 to 35 with an income K of 2000 and below. | customers ages from 20 to 35 refer to ID where age BETWEEN 20 AND 35; income K of 2000 and below refers to INCOME_K < 2000; level of education refers to EDUCATIONNUM; | SELECT T1.EDUCATIONNUM, T1.OCCUPATION FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T2.INCOME_K < 2000 AND T1.age >= 20 AND T1.age <= 35 | 5,925 | simple |
retails | Among all the suppliers in debt, how many of them are in Europe? | in debt refers to s_acctbal < 0; Europe refers to 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' AND T3.s_acctbal < 0 | 5,926 | simple |
sales_in_weather | What percentage was the total unit sales of store no.10 to the total sales of its weather station on 2014/10/31? | store no.10 refers to store_nbr = 10; on 2014/10/31 refers to date = '2014-10-31'; percentage = Divide (Sum(units where store_nbr = 10), Sum(units)) * 100 | SELECT CAST(SUM(CASE WHEN T2.store_nbr = 10 THEN units * 1 ELSE 0 END) AS REAL) * 100 / SUM(units) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE T1.`date` = '2014-10-31' | 5,927 | moderate |
retail_world | How many orders have Margaret Peacock placed? | SELECT COUNT(T2.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Margaret' AND T1.LastName = 'Peacock' | 5,928 | simple |
|
authors | List the authors and journal short name of the papers with "chemiluminescence" in its title and has a journal ID from 245 to 250. | with "chemiluminescence" in its title refers to Title LIKE 'chemiluminescence%'; journal ID from 245 to 250 refers to JournalId BETWEEN 245 AND 250 | SELECT T2.Name, T3.ShortName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T1.JournalId BETWEEN 245 AND 250 AND T1.Title LIKE '%chemiluminescence%' | 5,929 | moderate |
works_cycles | What product has the fewest online orders from one customer? List the product's class, line of business, and list price. | fewest online orders refer to MIN(Quantity); | SELECT T2.Class, T2.ProductLine, T2.ListPrice FROM ShoppingCartItem AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID ORDER BY SUM(Quantity) LIMIT 1 | 5,930 | moderate |
public_review_platform | How many businesses are registered in the database under 'Banks & Credit Unions' category? | category refers to category_name | SELECT COUNT(T2.business_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T1.category_name = 'Banks & Credit Unions' | 5,931 | simple |
movies_4 | How many movies were produced in Canada? | produced in Canada refers to country_name = 'Canada' | SELECT COUNT(T2.movie_id) FROM COUNTry AS T1 INNER JOIN production_COUNTry AS T2 ON T1.COUNTry_id = T2.COUNTry_id WHERE T1.COUNTry_name = 'Canada' | 5,932 | simple |
works_cycles | What is the salary rate per hour that the company paid to the first 5 employees that they hired? | salary rate per hour refers to Rate; first 5 employees that were hired refers to 5 oldest HireDate; | SELECT T1.Rate FROM EmployeePayHistory AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Person AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID ORDER BY T2.HireDate ASC LIMIT 0, 5 | 5,933 | moderate |
movie_platform | Who is the director of the movie Sex, Drink and Bloodshed? | Sex, Drink and Bloodshed refers to movie title = 'Sex, Drink and Bloodshed'; | SELECT director_name FROM movies WHERE movie_title = 'Sex, Drink and Bloodshed' | 5,934 | simple |
olympics | What is the sport name of "Cross Country Skiing Men's 10/15 kilometres Pursuit" event? | "Cross Country Skiing Men's 10/15 kilometres Pursuit" refers to event_name = 'Cross Country Skiing Men''s 10/15 kilometres Pursuit'; | SELECT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T2.event_name LIKE 'Cross Country Skiing Men%s 10/15 kilometres Pursuit' | 5,935 | simple |
mondial_geo | How many mountains are there on the African Continent? | SELECT COUNT(T3.Name) FROM country AS T1 INNER JOIN encompasses AS T2 ON T1.Code = T2.Country INNER JOIN continent AS T3 ON T3.Name = T2.Continent INNER JOIN province AS T4 ON T4.Country = T1.Code INNER JOIN geo_mountain AS T5 ON T5.Province = T4.Name WHERE T3.Name = 'European' | 5,936 | simple |
|
soccer_2016 | How many venues are located at Centurion, South Africa? | venues are located at Centurion refers to city_name = 'Centurion'; South Africa refers to country_name = 'South Africa' | SELECT COUNT(T1.Venue_name) FROM Venue AS T1 INNER JOIN City AS T2 ON T1.City_Id = T2.City_Id INNER JOIN Country AS T3 ON T2.Country_Id = T3.Country_Id WHERE T3.country_name = 'South Africa' AND T2.city_name = 'Centurion' | 5,937 | simple |
law_episode | What is the title of the episode with the keyword "laundering money"? | keyword "laundering money" refers to keyword = 'laundering money' | SELECT T1.title FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T2.keyword = 'laundering money' | 5,938 | simple |
talkingdata | What percentage of vivo devices belong to users with no information? | percentage = MULTIPLY(DIVIDE(SUM(gender = NULL and age = NULL and `group` = NULL), COUNT(device_id)), 1.0); vivo devices refers to phone_brand = 'vivo'; no information refers to gender = NULL AND age = NULL AND `group` = NULL; | SELECT SUM(IIF(T1.gender IS NULL AND T1.age IS NULL AND T1.`group` IS NULL, 1, 0)) / COUNT(T1.device_id) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo' | 5,939 | moderate |
superstore | State the highest profit made by Anna Chung's orders in the Central Superstore. | highest profit refers to max(Profit) | SELECT MAX(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Anna Chung' | 5,940 | simple |
hockey | In which year did the Montreal Canadiens have 49 penalty minutes in the Stanley Cup finals? Was it 1924, 1923 or 1918? | penalty minutes refer to PIM = 49; | SELECT T1.year FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens' AND T2.PIM = 49 | 5,941 | simple |
synthea | Give the procedure description of Ms. Jacquelyn Shanahan on 2009/8/9. | on 2009/8/9 refers to DATE = '2009-08-09'; | SELECT DISTINCT T2.description FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Jacquelyn' AND T1.last = 'Shanahan' AND T2.DATE = '2009-08-09' | 5,942 | moderate |
retails | Which country does supplier No.34 come from? | supplier No.34 refers to s_suppkey = 34; country refers to n_name; | SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_suppkey = 34 | 5,943 | simple |
mondial_geo | What is the capital of the country that has the Licancabur Mountain? | SELECT T4.Capital FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN country AS T4 ON T4.Province = T3.Name WHERE T1.Name = 'Licancabur' | 5,944 | simple |
|
menu | How many dishes are there on the menu "Zentral Theater Terrace"? | Zentral Theater Terrace is a name of menu; | SELECT SUM(CASE WHEN T3.name = 'Zentral Theater Terrace' 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 | 5,945 | simple |
works_cycles | List all the work orders that is related to the Down Tube. | Down Tube is a name of a product; | SELECT T2.WorkOrderID FROM Product AS T1 INNER JOIN WorkOrder AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Down Tube' | 5,946 | simple |
disney | How many of Gary Trousdale's movies are adventure movies? | Gary Trousdale refers director = 'Gary Trousdale'; the adventure movie refers to genre = 'Adventure'; | SELECT COUNT(T.name) FROM ( SELECT T1.name FROM director AS T1 INNER JOIN movies_total_gross AS T2 ON T1.name = T2.movie_title WHERE T1.director = 'Gary Trousdale' AND T2.genre = 'Adventure' GROUP BY T1.name ) T | 5,947 | moderate |
movie_3 | Please list any two films that Penelope Guiness acted in. | film refers to title of the film; 'Penelope Guiness' is a full name of an actor; full name refers to first_name, last_name | SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Penelope' AND T1.last_name = 'Guiness' LIMIT 2 | 5,948 | moderate |
donor | How many teachers have made some type of donation for projects in Chicago? | in Chicago refers to school_city = 'Chicago'; teachers refers to is_teacher_acct = 't' | SELECT COUNT(DISTINCT T2.teacher_acctid) FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.is_teacher_acct = 't' AND T2.school_city = 'Chicago' | 5,949 | simple |
soccer_2016 | Provide the country ID of East London. | East London refers to City_Name = 'East London' | SELECT Country_id FROM City WHERE City_Name = 'East London' | 5,950 | simple |
synthea | How many patients have diabetes that started in 1988? | diabetes that started in 1988 refers to DESCRIPTION = 'Diabetes' from conditions and START like '1988%'; | SELECT COUNT(PATIENT) FROM conditions WHERE DESCRIPTION = 'Diabetes' AND strftime('%Y', START) = '1988' | 5,951 | simple |
student_loan | Calculate the ratio of unemployed students who have never been absent from school. | ratio = CONCAT(DIVIDE(MULTIPLY(COUNT(unemployed.name WHERE month = 0), 100), COUNT(month)),'%'); unemployed students who have never been absent from school refers to (unemployed.name WHERE month = 0); | SELECT CAST(SUM(IIF(T2.month = 0, 1, 0)) AS REAL) * 100 / COUNT(T1.name) FROM unemployed AS T1 INNER JOIN longest_absense_from_school AS T2 ON T2.name = T1.name | 5,952 | simple |
retail_world | Which product have the highest user satisfaction? | product refers to ProductName; highest user satisfaction refers to max(ReorderLevel) | SELECT ProductName FROM Products WHERE ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products ) | 5,953 | simple |
software_company | What is the average education level of customers from the place with the highest average income per month? | place with the highest average income per month refers to GEOID where MAX(INCOME_K); average education level refers to AVG(EDUCATIONNUM); | SELECT AVG(T1.EDUCATIONNUM) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID ORDER BY T2.INCOME_K DESC LIMIT 1 | 5,954 | simple |
movie_3 | How many movies have a length longer than 100? | length longer than 100 refers to length > 100 | SELECT COUNT(film_id) FROM film WHERE length > 100 | 5,955 | simple |
social_media | What gender of users posted the most tweets in `en`? | "en" is the language and refers to Lang = 'en'; most tweet in 'en' refers to Max(Count(text where Lang = 'en')) | SELECT T.Gender FROM ( SELECT T2.Gender, COUNT( text) AS num FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Lang = 'en' GROUP BY T2.Gender ) T ORDER BY T.num DESC LIMIT 1 | 5,956 | simple |
chicago_crime | Please list the case numbers of all the crimes with no arrest made in Central Chicago. | no arrest made refers to arrest = 'FALSE'; Central Chicago refers to district_name = 'Central' | SELECT COUNT(*) FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T2.district_name = 'Central' AND T1.arrest = 'FALSE' | 5,957 | simple |
retails | Among the customers in the furniture market segment, how many of them have a nation key of 1? | furniture market segment refers to c_mktsegment = 'FURNITURE'; | SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'FURNITURE' AND c_nationkey = 1 | 5,958 | simple |
sales | List the first names of customers who have purchased products from sale person id 1. | SELECT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.SalesPersonID = 1 | 5,959 | simple |
|
simpson_episodes | Please check is "limbo dancing" the keyword for title "Dangerous Curves"? | SELECT CASE WHEN T2.Keyword = 'limbo dancing' THEN 'Yes' ELSE 'No' END AS result FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Dangerous Curves'; | 5,960 | moderate |
|
movie_3 | Among all the customers of store no.1, how many of them are active? | active refers to active = 1 | SELECT COUNT(customer_id) FROM customer WHERE active = 1 AND store_id = 1 | 5,961 | simple |
cars | List the name of the cars with model year 1975. | name of the car refers to car_name; model year 1975 refers to model_year = 1975 | SELECT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.model_year = 1975 | 5,962 | simple |
food_inspection_2 | Provide the salary range of the employee involved in the inspection ID 58424. | SELECT T1.salary, T3.salary FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id INNER JOIN employee AS T3 WHERE T2.inspection_id = 58424 ORDER BY T1.salary, T3.salary DESC LIMIT 1 | 5,963 | simple |
|
movies_4 | What are the top 5 most popular movie directors? | directors refers to job = 'Director'; most popular refers to max(popularity) | SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T2.job = 'Director' ORDER BY T1.popularity DESC LIMIT 5 | 5,964 | simple |
car_retails | How much did customer 103 pay in total? | Pay in total refers to SUM(amount); | SELECT SUM(t.amount) FROM payments t WHERE t.customerNumber = '103' | 5,965 | simple |
human_resources | If Jose Rodriguez tried his best, how many percentage can his salary raise without changing his position? | Jose Rodriguez is the full name of an employee; full name = firstname, lastname; calculation = DIVIDE(SUBTRACT(maxsalary, salary), salary) * 100 | SELECT 100 * (CAST(REPLACE(SUBSTR(T2.maxsalary, 4), ',', '') AS REAL) - CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) / CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL) AS per FROM employee AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'Jose' AND T1.lastname = 'Rodriguez' | 5,966 | challenging |
menu | Among the menu pages on which the dish "Chicken gumbo" had appeared, what is the menu ID of the one with the biggest width? | Chicken gumbo is a name of dish; biggest width refers to MAX(full_width); | SELECT T1.id FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T3.name = 'Chicken gumbo' ORDER BY T1.full_width DESC LIMIT 1 | 5,967 | moderate |
talkingdata | Provide the locations and times of the events of app ID "8715964299802120000". | locations = longitude, latitude; times of the events refers to timestamp; | SELECT T1.longitude, T1.latitude, T1.timestamp FROM events AS T1 INNER JOIN app_events AS T2 ON T1.event_id = T2.event_id WHERE T2.app_id = 8715964299802120000 | 5,968 | simple |
beer_factory | Please list the full names of the customers who have purchased at least one root beer produced by AJ Stephans Beverages. | full name = First, Last; customers who have purchased at least one root beer refers to CustomerID > = 1; produced by AJ Stephans Beverages refers to BreweryName = 'AJ Stephans Beverages'; | SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeer AS T3 ON T2.RootBeerID = T3.RootBeerID INNER JOIN rootbeerbrand AS T4 ON T3.BrandID = T4.BrandID WHERE T4.BreweryName = 'AJ Stephans Beverages' | 5,969 | moderate |
mondial_geo | What is the latitude of the island on which Mount Andrinjitra is located? | SELECT T1.Latitude FROM island AS T1 INNER JOIN mountainOnIsland AS T2 ON T1.Name = T2.Island WHERE T2.Mountain = 'Andringitra' | 5,970 | simple |
|
ice_hockey_draft | What is the height in centimeter of the tallest player born in Edmonton, Alberta, Canada? | height in centimeter refers to height_in_cm; tallest player refers to MAX(height_in_cm); born in Edmonton, Alberta, Canada refers to birthplace = 'Edmonton, AB, CAN'; | SELECT T2.height_in_cm FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.birthplace = 'Edmonton, AB, CAN' ORDER BY T2.height_in_cm DESC LIMIT 1 | 5,971 | simple |
book_publishing_company | Which publisher had the highest job level? Give his/her full name. | highest job level refers to MAX(job_lvl) | SELECT T1.fname, T1.minit, T1.lname FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id ORDER BY T1.job_lvl DESC LIMIT 1 | 5,972 | simple |
legislator | Give the YouTube ID of the channel 'RepWassermanSchultz.' | RepWassermanSchultz refers to youtube | SELECT youtube_id FROM `social-media` WHERE youtube = 'RepWassermanSchultz' | 5,973 | simple |
professional_basketball | Which winning team in the final round of the postseason series games against the LAL won more than 60 games in the NBA league during the year 1996? | final round of post season refers to round = 'CSF'; won against LAL refers to tmIDLoser = 'LAL'; in the NBA league refers to lgID = 'NBA'; won more than 60 games refers to won > 60 | SELECT DISTINCT T2.tmID FROM series_post AS T1 INNER JOIN teams AS T2 ON T1.tmIDWinner = T2.tmID WHERE T2.won > 60 AND T1.year = 1996 AND T1.round = 'CSF' AND T1.tmIDLoser = 'LAL' | 5,974 | moderate |
video_games | Indicate the publisher who has published the most games of all time. | publisher refers to publisher_name; publisher who has published the most games of all time refers to MAX(COUNT(publisher_name)); | SELECT T.publisher_name FROM ( SELECT T2.publisher_name, COUNT(DISTINCT T1.game_id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id GROUP BY T2.publisher_name ORDER BY COUNT(DISTINCT T1.game_id) DESC LIMIT 1 ) t | 5,975 | moderate |
professional_basketball | From 1962 to 1975, how many coaches received the award? | from 1960 to 1975 refers to year between 1960 and 1975 | SELECT COUNT(DISTINCT coachID) FROM awards_coaches WHERE year BETWEEN 1962 AND 1975 | 5,976 | simple |
retail_complains | What was the phone of number of the client who made the complaint call "CR0100432" ? | complaint call refers to Complaint ID; | SELECT T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0100432' | 5,977 | simple |
public_review_platform | Please indicate the closing hours and business days of the businesses with the category named Doctors. | closing hours refer to closing_time; business days refer to day_id from Business_Hours; | SELECT DISTINCT T3.opening_time, T3.day_id FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T1.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id WHERE T2.category_name = 'Doctors' | 5,978 | simple |
food_inspection | Tell the Id number of the business with the most number of violations. | Id number for that business refers to business_id; the most number of violations refers to MAX(COUNT(business_id)); | SELECT business_id FROM violations GROUP BY business_id ORDER BY COUNT(business_id) DESC LIMIT 1 | 5,979 | simple |
superstore | What is the shipment duration for order number CA-2011-134103? | shipment duration = subtract("Ship Date", "Order Date"); order number CA-2011-134103 refers to "Order ID" = 'CA-2011-134103' | SELECT DISTINCT strftime('%J', `Ship Date`) - strftime('%J', `Order Date`) AS duration FROM central_superstore WHERE `Order ID` = 'CA-2011-134103' | 5,980 | simple |
computer_student | What level is course 165? List the professors who teach the course. | course 165 refers to course_id = 165; professors refers to taughtBy.p_id | SELECT T1.courseLevel, T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.course_id = 165 | 5,981 | simple |
sales | List the full name of the customer who purchased the most quantity of products. | full name of the customer = FirstName, LastName; most quantity refers to MAX(Quantity); | SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID ORDER BY T2.Quantity DESC LIMIT 1 | 5,982 | simple |
professional_basketball | List the first name, last name and team name of players who are drafted from 'Seattle' between year 1965 to 1970. | team name refers to teams.name; drafted from 'Seattle' refers to draftFrom = 'Seattle'; between year 1965 to 1970 refers to draftYear between 1965 and 1970 | SELECT DISTINCT T1.firstName, T1.lastName, T3.name FROM players AS T1 INNER JOIN draft AS T2 ON T1.playerID = T2.playerID INNER JOIN teams AS T3 ON T2.tmID = T3.tmID WHERE T2.draftFrom = 'Seattle' AND T2.draftYear BETWEEN 1965 AND 1970 | 5,983 | moderate |
regional_sales | Which Apollo Ltd customer's order number has the most expensive unit price, indicating the order date? | "Apollo Ltd" is the Customer Names; most expensive unit price refers to max(Unit Price) | SELECT T1.OrderNumber, T1.OrderDate FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Apollo Ltd' ORDER BY T1.`Unit Price` DESC LIMIT 1 | 5,984 | simple |
olympics | Mention the height of people who belong to region id 7. | SELECT T2.height FROM person_region AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.id WHERE T1.region_id = 7 | 5,985 | simple |
|
cookbook | How many ingredients are there in the recipe that is best in helping your body's natural defence against illness and infection? | best in helping your body's natural defence against illness and infection refers to MAX(vitamin_a); | SELECT COUNT(*) FROM Nutrition AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.vitamin_a > 0 | 5,986 | simple |
talkingdata | Please list the location coordinates of all the Galaxy Note 2 devices when an event happened. | location coordinates = longitude, latitude; Galaxy Note 2 refers to device_model = 'Galaxy Note 2'; | SELECT T1.longitude, T1.latitude FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'Galaxy Note 2' | 5,987 | simple |
retails | Please list the names of all the suppliers for the part with the highest retail price. | supplier name refers to s_name; the highest retail price refers to max(p_retailprice) | 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 | 5,988 | moderate |
mondial_geo | What is the height of the mountain on which river 'Lech' is located? Please also provide its longitude and latitude. | SELECT T1.Height, T1.Latitude, T1.Longitude FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN located AS T4 ON T4.Province = T3.Name WHERE T4.River = 'Lech' | 5,989 | moderate |
|
soccer_2016 | What is the second team's name in the match with the lowest winning margin? | lowest winning margin refers to MIN(win_margin); team name refers to team_name; second team refers to team_2 | SELECT T1.team_name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.team_2 ORDER BY T2.win_margin LIMIT 1 | 5,990 | simple |
shakespeare | Please list all the paragraphs in Act 1, Scene 1 in Twelfth Night. | Twelfth Night refers to Title = 'Twelfth Night'; list the paragraphs refers to PlainText | SELECT T3.PlainText 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 WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'Twelfth Night' | 5,991 | simple |
soccer_2016 | How old is Ishan Kishan in 2022? | old refers to SUBTRACT(2022, SUBSTR(DOB, 1, 4)); Ishan Kishan refers to Player_Name = 'Ishan Kishan'; | SELECT 2022 - SUBSTR(DOB, 1, 4) FROM Player WHERE Player_Name = 'Ishan Kishan' | 5,992 | simple |
retail_complains | Which complaint is more urgent, complaint ID CR2400594 or ID CR2405641? | more urgent refers to MAX(priority); | SELECT CASE WHEN SUM(CASE WHEN `Complaint ID` = 'CR2400594' THEN priority END) > SUM(CASE WHEN `Complaint ID` = 'CR2405641' THEN priority END) THEN 'CR2400594' ELSE 'CR2405641' END FROM callcenterlogs | 5,993 | moderate |
cookbook | How many baking product ingredients are there in the No-Bake Chocolate Cheesecake? | baking product is a category; No-Bake Chocolate Cheesecake refers to title; | SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T3.category = 'baking products' AND T1.title = 'No-Bake Chocolate Cheesecake' | 5,994 | simple |
chicago_crime | What is the total number of crimes that happened in Bridgeport with beat less than 1000? | Bridgeport refers to community_area_name = 'Bridgeport'; with beat less than 1000 refers to beat < 1000; total number = count(beat) where community_area_name = 'Bridgeport' and beat < 1000 | SELECT SUM(CASE WHEN T2.beat < 1000 THEN 1 ELSE 0 END) FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no WHERE T1.community_area_name = 'Bridgeport' | 5,995 | simple |
soccer_2016 | Calculate the win rate of the toss-winners in 2012. | in 2012 refers to Match_Date like '2012%'; win rate refers to DIVIDE(COUNT(Toss_Winner = Match_Winner), COUNT(Match_Date like '2012%')) | SELECT CAST(SUM(CASE WHEN Toss_Winner = Match_Winner THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN Match_Date LIKE '2012%' THEN 1 ELSE 0 END) FROM `Match` | 5,996 | simple |
talkingdata | How many events in total have happened on all the vivo devices in the year 2016? | vivo devices refers to phone_brand = 'vivo'; in the year 2016 refers to year(timestamp) = 2016; | SELECT COUNT(T1.event_id) FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.event_id = T2.device_id WHERE STRFTIME('%Y', T1.timestamp) = '2016' AND T2.phone_brand = 'vivo' | 5,997 | simple |
chicago_crime | Who is the commanding officer in the district with the highest number of disorderly conduct? | commanding officer refers to commander; the highest number refers to max(count(district_no)); disorderly conduct refers to title = 'Disorderly Conduct' | SELECT T1.commander FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no INNER JOIN FBI_Code AS T3 ON T2.fbi_code_no = T3.fbi_code_no WHERE T3.title = 'Disorderly Conduct' AND T2.fbi_code_no = 24 GROUP BY T2.fbi_code_no ORDER BY COUNT(T1.district_no) DESC LIMIT 1 | 5,998 | moderate |
legislator | How many female representatives are there in Michigan? | female refers to gender_bio = 'F'; representatives refers to type = 'rep'; Michigan refers to state = 'MI'; | SELECT COUNT(T.bioguide_id) FROM ( SELECT T1.bioguide_id FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'rep' AND T2.state = 'MI' AND T1.gender_bio = 'F' GROUP BY T1.bioguide_id ) T | 5,999 | simple |
Subsets and Splits