db_id
stringclasses 68
values | question
stringlengths 33
321
| evidence
stringlengths 0
673
| SQL
stringlengths 116
743
| question_id
int64 3
6.6k
| difficulty
stringclasses 2
values |
---|---|---|---|---|---|
address | In California, how many delivery receptacles are there in the community post office that has the highest number of delivery receptacles? | in California refers to name = 'California' and state = 'CA'; 'Community Post Office' is the Type | SELECT COUNT(*) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.abbreviation = 'CA' AND T2.type LIKE '%Community Post Office%' AND T1.name = 'California' AND T2.state = 'CA' | 27 | moderate |
address | Calculate the percentage of congress representatives from the Democrat party. Among them, how many postal points are in the Hawaii state? | DIVIDE(COUNT(party = 'Democrat'), COUNT(congress_rep_id)) as percentage; postal points refer to zip_code; state = 'Hawaii'; | SELECT CAST(SUM(CASE WHEN T1.party = 'Democrat' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*), SUM(CASE WHEN T1.state = 'Hawaii' THEN 1 ELSE 0 END) FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district | 810 | moderate |
address | Calculate the percentage of households in residential areas of countries over 10000. | DIVIDE(SUM(households > 10000), SUM(households)) as percentage; | SELECT CAST(COUNT(CASE WHEN T2.households > 10000 THEN T1.zip_code ELSE NULL END) AS REAL) * 100 / COUNT(T1.zip_code) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code | 3,317 | moderate |
address | Among the cities with alias Ponce, what is the percentage of cities with a country level FIPS code of less than 20? | DIVIDE(COUNT(county_fips < 20), COUNT(county_fips)) as percentage where alias = 'Ponce'; | SELECT CAST(COUNT(CASE WHEN T2.county_fips < 20 THEN T2.zip_code ELSE NULL END) AS REAL) * 100 / COUNT(T2.zip_code) FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.alias = 'Ponce' | 6,092 | moderate |
address | Among the postal points in California, calculate the percentage of them in post office types. | DIVIDE(COUNT(zip_code where type = 'Post Office'), COUNT(zip_code)) as percentage where name = 'California'; | SELECT CAST(COUNT(CASE WHEN T2.type = 'Post Office' THEN T2.zip_code ELSE NULL END) AS REAL) * 100 / COUNT(T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'California' | 3,037 | moderate |
address | For the county where DeSantis Ron is from, what is the average female median age? | average female median age refers to Divide (Sum(female_median_age), Count(county)) | SELECT SUM(T4.female_median_age) / COUNT(T1.county) FROM country AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id INNER JOIN zip_data AS T4 ON T1.zip_code = T4.zip_code WHERE T3.first_name = 'DeSantis' AND T3.last_name = 'Ron' | 6,497 | moderate |
address | Provide the zip code, city, and congress representative's full names of the area which has highest population in 2020. | representative's full names refer to first_name, last_name; area which has highest population in 2020 refers to MAX(population_2020); | SELECT T1.zip_code, T1.city, T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id GROUP BY T2.district ORDER BY T1.population_2020 DESC LIMIT 1 | 1,447 | moderate |
address | What is the difference in the number of cities with P.O. box only and cities with Post Office among the cities with area code 787? | SUBTRACT(COUNT(type = 'P.O. Box Only'), COUNT(type = 'Post Office')) where area_code = 787; | SELECT COUNT(CASE WHEN T2.type = 'P.O. Box Only' THEN 1 ELSE NULL END) - COUNT(CASE WHEN T2.type = 'Post Office' THEN 1 ELSE NULL END) AS DIFFERENCE FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 787 | 1,462 | moderate |
address | Calculate the difference between the 2020 population and the 2010 population for the districts represented by Griffin Tim. | difference = Subtract (population_2020, population_2010) | SELECT T1.population_2020 - T1.population_2010 FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T3.first_name = 'Griffin' AND T3.last_name = 'Tim' | 2,349 | moderate |
address | Among the cities belonging to the country named Arroyo, calculate the percentage of increase in the population in these cities from 2010 to 2020. | DIVIDE(SUBTRACT(SUM(population_2020)), SUM(population_2010)), SUM(population_2010) as percentage where county = 'ARROYO'; | SELECT CAST((SUM(T2.population_2020) - SUM(T2.population_2010)) AS REAL) * 100 / SUM(T2.population_2010) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Arroyo' | 2,545 | moderate |
address | What is the difference in the most populated city of Allentown-Bethlehem-Easton, PA-NJ in 2020 against its population in 2010? | "Allentown-Bethlehem-Easton, PA-NJ" is the CBSA_name; most populated city refers to Max(population_2020); difference = Subtract (population_2020, population_2011) | SELECT T1.population_2020 - T1.population_2010 AS result_data FROM zip_data AS T1 INNER JOIN CBSA AS T2 ON T1.CBSA = T2.CBSA WHERE T2.CBSA_name = 'Allentown-Bethlehem-Easton, PA-NJ' ORDER BY T1.population_2020 DESC LIMIT 1 | 3,132 | moderate |
address | What is the difference in the number of bad alias between Aguada city and Aguadilla city? | SUBTRACT(COUNT(bad_alias where city = 'Aguada'), COUNT(bad_alias where city = 'Aguadilla')); | SELECT COUNT(CASE WHEN T2.city = 'Aguada' THEN T1.bad_alias ELSE NULL END) - COUNT(CASE WHEN T2.city = 'Aguadilla' THEN T1.bad_alias ELSE NULL END) AS DIFFERENCE FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code | 3,174 | moderate |
address | Provide the zip codes and the congress representatives' names of the postal points which are affiliated with Readers Digest. | representative's full names refer to first_name, last_name; postal points affiliated with Readers Digest refer to zip_code where organization = 'Readers Digest'; | SELECT T1.zip_code, T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T1.organization = 'Readers Digest' | 3,603 | moderate |
address | What is the highest gender ratio of the residential areas in Arecibo county? | "ARECIBO" is the county; highest gender ration refers to Max(Divide (male_population, female_population)) | SELECT CAST(T1.male_population AS REAL) / T1.female_population FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO' AND T1.female_population <> 0 ORDER BY 1 DESC LIMIT 1 | 5,569 | moderate |
address | Compare the numbers of postal points under Smith Adrian and Heck Joe. | COUNT(zip_code where first_name = 'Smith' and last_name = 'Adrian') > COUNT(zip_code where first_name = 'Heck' and last_name = 'Joe'); | SELECT CASE WHEN COUNT(CASE WHEN T1.first_name = 'Smith' AND T1.last_name = 'Adrian' THEN T2.zip_code ELSE NULL END) > COUNT(CASE WHEN T1.first_name = 'Heck' AND T1.last_name = 'Joe' THEN T2.zip_code ELSE NULL END) THEN 'Smith Adrian>Heck Joe' ELSE 'Smith Adrian<=Heck Joe' END AS COMPARE FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district | 3,521 | challenging |
address | Calculate the ratio between the number of representatives in Alabama and the number of representatives in Illinois. | "Alabama" and "Illinois" are both state; Ratio = Divide (Count(state = 'Alabama'), Count(state = 'Illinois')) | SELECT CAST(COUNT(CASE WHEN state = 'Alabama' THEN cognress_rep_id ELSE NULL END) AS REAL) / COUNT(CASE WHEN state = 'Illinois' THEN cognress_rep_id ELSE NULL END) FROM congress | 4,925 | moderate |
address | What is the percentage ratio between Democrats and Republicans in Indiana? List the zip codes belonging to Democrats. | "Democrats" and "Republicans" refers to party = 'Democrat" and party = 'Republican'; percentage ratio = Multiply (Divide (Count(party = 'Democrat"), Count(party = 'Republican')), 100) | SELECT CAST(COUNT(CASE WHEN T2.party = 'Democrat' THEN 1 ELSE NULL END) AS REAL) / COUNT(CASE WHEN T2.party = 'Republican' THEN 1 ELSE NULL END)FROM zip_congress AS T1 INNER JOIN congress AS T2 ON T2.cognress_rep_id = T1.district | 4,516 | moderate |
airline | How many flights depart to Hartsfield-Jackson Atlanta International from Chicago O'Hare International? | depart to refers to DEST; Hartsfield-Jackson Atlanta International refers to Description = 'Atlanta, GA: Hartsfield-Jackson Atlanta International'; depart from refers to ORIGIN; Chicago O'Hare International refes to Description = 'Chicago, IL: Chicago O'Hare International'; | SELECT COUNT(FL_DATE) FROM Airlines WHERE ORIGIN = ( SELECT T2.ORIGIN FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN WHERE T1.Description = 'Chicago, IL: Chicago O''Hare International' ) AND DEST = ( SELECT T4.DEST FROM Airports AS T3 INNER JOIN Airlines AS T4 ON T3.Code = T4.DEST WHERE T3.Description = 'Atlanta, GA: Hartsfield-Jackson Atlanta International' ) | 4,071 | moderate |
airline | What is the actual departure time of JetBlue Airways with the plane's tail number N903JB to Fort Lauderdale-Hollywood International Airport on the 20th of August 2018? | actual departure time refers to DEP_TIME; JetBlue Airways refers to Description like '%JetBlue Airways%'; tail number refers to TAIL_NUM; TAIL_NUM = 'N903JB'; to refers to DEST; Fort Lauderdale-Hollywood International Airport refers to Description like '%Fort Lauderdale-Hollywood%'; on the 20th of August 2018 refers to FL_DATE = '2018/8/20'; | SELECT T1.DEP_TIME FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code INNER JOIN Airports AS T3 ON T1.DEST = T3.Code WHERE T1.FL_DATE = '2018/8/20' AND T1.TAIL_NUM = 'N903JB' AND T2.Description LIKE '%JetBlue Airways%' AND T3.Description LIKE '%Fort Lauderdale-Hollywood%' | 5,404 | moderate |
airline | Among the airports whose destination is Logan International, what is the airline id of the carrier operator with the highest delay in minutes due to security? | destination refers to DEST; Logan International refers to Description = 'Boston, MA: Logan International'; airline id of the carrier operator refers to OP_CARRIER_AIRLINE_ID; highest delay in minutes due to security refers to MAX(SECURITY_DELAY); | SELECT T2.OP_CARRIER_AIRLINE_ID FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T1.Description = 'Boston, MA: Logan International' AND T2.DEST = 'BOS' ORDER BY T2.SECURITY_DELAY DESC LIMIT 1 | 6,386 | moderate |
airline | Among the flights operated by American Airlines Inc. on 2018/8/1, how many of them were cancelled? | American Airlines Inc. refers to Description = 'American Airlines Inc.: AA'; on 2018/8/1 refers to FL_DATE = '2018/8/1'; cancelled refers to CANCELLED = 1; | SELECT SUM(CASE WHEN T2.CANCELLED = 1 THEN 1 ELSE 0 END) AS count FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T2.FL_DATE = '2018/8/1' AND T3.Description = 'American Airlines Inc.: AA' | 460 | moderate |
airline | On August 2018, which day had the highest number of cancelled flights due to the most serious reasons in Dallas/Fort Worth International? | On August 2018 refers to FL_DATE like '2018/8%'; day with the highest number of cancelled flights refers to MAX(COUNT(FL_DATE WHERE CANCELLED = 1)); cancelled due to the most serious reasons refers to CANCELLATION_CODE = 'A'; in Dallas/Fort Worth International refers to Description = 'Dallas/Fort Worth, TX: Dallas/Fort Worth International'; | SELECT T2.FL_DATE FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN WHERE T2.FL_DATE LIKE '2018/8%' AND T1.Description = 'Dallas/Fort Worth, TX: Dallas/Fort Worth International' AND T2.ORIGIN = 'DFW' AND T2.CANCELLED = 1 AND T2.CANCELLATION_CODE = 'A' GROUP BY T2.FL_DATE ORDER BY COUNT(T2.FL_DATE) DESC LIMIT 1 | 481 | moderate |
airline | What is the percentage of flights which landed at Pittsburgh were faster than scheduled? | percentage = MULTIPLY(DIVIDE(SUM(ACTUAL_ELAPSED_TIME < T2.CRS_ELAPSED_TIME), COUNT(Code)), 100); landed at refers to DEST; Pittsburgh refers to Description which contains 'Pittsburgh'; faster than scheduled refers to ACTUAL_ELAPSED_TIME < CRS_ELAPSED_TIME; | SELECT CAST(SUM(CASE WHEN T1.ACTUAL_ELAPSED_TIME < T1.CRS_ELAPSED_TIME THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Airlines AS T1 INNER JOIN Airports AS T2 ON T2.Code = T1.DEST WHERE T2.Description LIKE '%Pittsburgh%' AND T1.CRS_ELAPSED_TIME IS NOT NULL AND T1.ACTUAL_ELAPSED_TIME IS NOT NULL | 3,027 | challenging |
airline | For the flight from ATL to PHL on 2018/8/1 that scheduled local departure time as "2040", which air carrier does this flight belong to? | flight from ATL refers to ORIGIN = 'ATL'; flight to PHL refers to DEST = 'PHL'; on 2018/8/1 refers to FL_DATE = '2018/8/1'; local departure time refers to CRS_DEP_TIME; CRS_DEP_TIME = '2040'; | SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.FL_DATE = '2018/8/1' AND T1.ORIGIN = 'ATL' AND T1.DEST = 'PHL' AND T1.CRS_DEP_TIME = '2040' GROUP BY T2.Description | 4,242 | moderate |
airline | Which airline operated more flights on 2018/8/1, American Airlines Inc. or Endeavor Air Inc.? | SUM(Description = 'American Airlines Inc.: AA') > SUM(Description = 'Endeavor Air Inc.: 9E') means American Airlines Inc. operated more flights than Endeavor Air Inc; SUM(Description = 'American Airlines Inc.: AA') < SUM(Description = 'Endeavor Air Inc.: 9E') means Endeavor Air Inc. operated more flights than American Airlines Inc.; on 2018/8/1 refers to FL_DATE = '2018/8/1'; | SELECT CASE WHEN COUNT(CASE WHEN T3.Description = 'American Airlines Inc.: AA' THEN 1 ELSE NULL END) > COUNT(CASE WHEN T3.Description = 'Endeavor Air Inc.: 9E' THEN 1 ELSE NULL END) THEN 'American Airlines Inc.: AA' ELSE 'Endeavor Air Inc.: 9E' END AS RESULT FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T2.FL_DATE = '2018/8/1' | 982 | challenging |
airline | List the tail numbers of all the aircraft that arrived on time at Meadows Field airport in August of 2018? | tail number refers to TAIL_NUM; arrived on time refers to ARR_DELAY < = 0; Meadows Field airport refers to Description = 'Bakersfield, CA: Meadows Field'; in August of 2018 refers to FL_DATE like '2018/8%'; | SELECT T2.TAIL_NUM FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T2.FL_DATE LIKE '2018/8%' AND T1.Description = 'Bakersfield, CA: Meadows Field' AND T2.DEST = 'BFL' AND T2.ARR_DELAY <= 0 GROUP BY T2.TAIL_NUM | 1,491 | moderate |
airline | Among the flights with air carrier "Southwest Airlines Co.: WN", provide the tail number of flights with an actual elapsed time lower than the 80% of the average actual elapsed time of listed flights. | Southwest Airlines Co.: WN refers to Description = 'Southwest Airlines Co.: WN'; tail number refers to TAIL_NUM; actual elapsed time lower than the 80% of the average actual elapsed time refers to ACTUAL_ELAPSED_TIME < (MULTIPLY AVG(ACTUAL_ELAPSED_TIME), 0.8); | SELECT T2.TAIL_NUM FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Southwest Airlines Co.: WN' AND T2.ACTUAL_ELAPSED_TIME < ( SELECT AVG(ACTUAL_ELAPSED_TIME) * 0.8 FROM Airlines ) | 308 | moderate |
airline | How many hours in total did all of the Delta Air Lines aircraft were delayed due to a late aircraft in August of 2018? Identify the plane number of the aircraft with the highest delayed hours. | hours in total = DIVIDE(SUM(LATE_AIRCRAFT_DELAY), 60); Delta Air Lines refers to Description = 'Delta Air Lines Inc.: DL'; delayed due to a late aircraft refers to LATE_AIRCRAFT_DELAY; in August of 2018 refers to FL_DATE like '2018/8/%'; plane number refers to TAIL_NUM; highest delayed hours refers to MAX(DIVIDE(SUM(LATE_AIRCRAFT_DELAY),60)); | SELECT T1.TAIL_NUM, SUM(CAST(T1.LATE_AIRCRAFT_DELAY AS REAL) / 60) AS delay FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T2.Code = T1.OP_CARRIER_AIRLINE_ID WHERE T1.FL_DATE LIKE '2018/8/%' AND T2.Description = 'Delta Air Lines Inc.: DL' ORDER BY delay DESC LIMIT 1 | 1,644 | moderate |
airline | Please list the flight numbers of all the flights operated by American Airlines Inc. that were scheduled to depart from John F. Kennedy International. | flight numbers refers to OP_CARRIER_FL_NUM; American Airlines Inc. refers to Description = 'American Airlines Inc.: AA'; depart from refers to ORIGIN; John F. Kennedy International refers to Description = 'New York, NY: John F. Kennedy International'; | SELECT T2.OP_CARRIER_FL_NUM FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T3.Description = 'American Airlines Inc.: AA' AND T1.Description = 'New York, NY: John F. Kennedy International' AND T2.FL_DATE = '2018/8/1' | 5,674 | moderate |
airline | List the air carrier's description with arrival time lower than the 40% of the average arrival time of flights that flew to Phoenix. | arrival time lower than the 40% of the average arrival time refers to ARR_TIME < MULTIPLY(AVG(ARR_TIME), 0.4); flew to Phoenix refers to DEST = 'PHX'; | SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.DEST = 'PHX' AND T2.ARR_TIME < ( SELECT AVG(ARR_TIME) * 0.4 FROM Airlines ) GROUP BY T1.Description | 311 | moderate |
airline | What is the tail number of a Compass Airline's plane that flew the most number of flights from LAX to ABQ? | tail number refers to TAIL_NUM; Compass Airline refers to Description = 'Compass Airlines: CP'; flew the most number of lights from LAX TO ABQ refers to MAX(COUNT(OP_CARRIER_AIRLINE_ID WHERE ORIGIN = 'LAX' and DEST = 'ABQ')); from LAX refers to ORIGIN = 'LAX'; to ABQ refers to DEST = 'ABQ'; | SELECT T2.OP_CARRIER_AIRLINE_ID FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Compass Airlines: CP' AND T2.ORIGIN = 'LAX' AND T2.DEST = 'ABQ' GROUP BY T2.OP_CARRIER_AIRLINE_ID ORDER BY COUNT(T2.OP_CARRIER_AIRLINE_ID) DESC LIMIT 1 | 2,934 | moderate |
airline | Among the flights operated by American Airlines Inc., how many of them were scheduled to land in New York? | American Airlines Inc. refers to Description = 'American Airlines Inc.: AA'; land in New York refers to DEST = 'JFK'; | SELECT SUM(CASE WHEN T2.DEST = 'JFK' THEN 1 ELSE 0 END) AS count FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T3.Description = 'American Airlines Inc.: AA' | 4,364 | moderate |
airline | What is the percentage of flights from Los Angeles International airport that were cancelled due to a type C cancellation code? | percentage = MULTIPLY(DIVIDE(SUM(CANCELLATION_CODE = 'C'), COUNT(Code)), 100); flights from refers to ORIGIN; Los Angeles International airport refers to Description = 'Los Angeles, CA: Los Angeles International'; cancelled refers to Cancelled = 1; cancelled due to a type C cancellation code refers to CANCELLATION_CODE = 'C'; | SELECT CAST(SUM(CASE WHEN T2.CANCELLATION_CODE = 'C' THEN 1.0 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN WHERE T2.FL_DATE = '2018/8/15' AND T2.CANCELLATION_CODE IS NOT NULL AND T1.Description = 'Los Angeles, CA: Los Angeles International' | 6,150 | moderate |
app_store | How many apps were last updated in January of 2018? Please write one translated review with positive sentiment for each app, if there's any. | updated in January of 2018 refers to Last Updated BETWEEN 'January 1, 2018' and 'January 31, 2018'; | SELECT DISTINCT Translated_Review FROM user_reviews WHERE App IN ( SELECT App FROM playstore WHERE `Last Updated` BETWEEN 'January 1, 2018' AND 'January 31, 2018' ) AND Sentiment = 'Positive' | 1,724 | moderate |
app_store | For the Honkai Impact 3rd App, what is the highest sentiment polarity score and what genre does it belong to? | highest sentiment polarity score refers to MAX(Sentiment_Polarity); | SELECT MAX(T2.Sentiment_Polarity), T1.Genres FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Honkai Impact 3rd' AND T2.Sentiment_Polarity > 0.5 GROUP BY T1.Genres | 84 | moderate |
app_store | How many users mildly likes the 7 Minute Workout app and when was it last updated? | mildly likes the app refers to Sentiment_Polarity> = 0 and Sentiment_Polarity<0.5; | SELECT COUNT(T2.Sentiment_Polarity), T1."Last Updated" FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = '7 Minute Workout' AND T2.Sentiment_Polarity BETWEEN 0 AND 0.5 | 561 | moderate |
app_store | Which 1,000,000,000+ intalls apps has the most no comment reviews? | no comment refers to Translated_Review = 'nan'; most no comment reviews = (MAX(COUNT(Translated_Review = 'nan'))); | SELECT T1.App FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Installs = '1,000,000+' AND T2.Translated_Review = 'nan' GROUP BY T1.App ORDER BY COUNT(T2.Translated_Review) DESC LIMIT 1 | 2,337 | moderate |
app_store | For the Akinator app, how many reviews have sentiment subjectivity of no more than 0.5 and what is its current version? | Sentiment_Subjectivity<0.5; current version refers to Current Ver; | SELECT COUNT(T2.Sentiment_Subjectivity), T1."Current Ver" FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Akinator' AND T2.Sentiment_Subjectivity < 0.5 | 3,916 | moderate |
app_store | What is the percentage ratio between positive sentiments and negative sentiments that are in Fate/Grand Order? Also indicate the current version. | Fate/Grand Order is the App; percentage ratio = MULTIPLY(DIVIDE((SUM(Sentiment = 'Positive')), (SUM(Sentiment = 'Negative'))), 100); | SELECT CAST(SUM(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Sentiment = 'Negative' THEN 1 ELSE 0 END), T1.`Current Ver` FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Fate/Grand Order (English)' AND T1.`Current Ver` = '1.18.0' | 2,746 | challenging |
app_store | How much is the size of Browser 4G and how many users have a pretty positive favorability on it? | Browser 4G is the App; pretty positive favorability refers to Sentiment_Polarity score = 0.5 | SELECT T1.Size, COUNT(T1.App) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Browser 4G' AND T2.Sentiment_Polarity >= 0.5 | 3,691 | moderate |
app_store | Which education App has the worst rating and state the translated review if available. | education App refers to Category = 'EDUCATION'; worst rated app refers to Rating = 1; | SELECT T1.App, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Category = 'EDUCATION' GROUP BY T1.App, T2.Translated_Review ORDER BY T1.Rating ASC LIMIT 1 | 1,761 | moderate |
app_store | What percentage of no comment reviews are from "Teen" content rating apps? | no comment refers to Translated_Review = 'nan'; percentage = DIVIDE((SUM(Content Rating = 'Teen')), COUNT(*)); | SELECT CAST(COUNT(CASE WHEN T1.`Content Rating` = 'Teen' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.App) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Translated_Review = 'nan' | 5,899 | moderate |
app_store | What is the average rating of Apps falling under the racing genre and what is the percentage ratio of positive sentiment reviews? | average rating = AVG(Rating); percentage = MULTIPLY(DIVIDE((SUM(Sentiment = 'Positive')), (COUNT(*)), 100)); | SELECT AVG(T1.Rating), CAST(COUNT(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.Sentiment) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Genres = 'Racing' | 1,034 | moderate |
app_store | List out the top 3 genre for application with a sentiment review greater than 0.5. | sentiment review refers to Sentiment_Polarity; Sentiment_Polarity>0.5; | SELECT Genres FROM playstore WHERE App IN ( SELECT App FROM user_reviews WHERE Sentiment = 'Positive' AND Sentiment_Polarity > 0.5 ORDER BY Sentiment_Polarity DESC LIMIT 3 ) | 5,289 | moderate |
app_store | List down application that have not been updated since 2015. What is the percentage of this application having more negative sentiment than positive sentiment? | percentage = DIVIDE(SUBTRACT(SUM(Sentiment = 'Positive')), (SUM(Sentiment = 'Negative'))), (SUM(Sentiment = 'Negative')) as percent; Last Updated>'2015'; | SELECT CAST((( SELECT COUNT(*) Po FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' AND T2.Sentiment = 'Positive' ) - ( SELECT COUNT(*) Ne FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' AND T2.Sentiment = 'Negative' )) AS REAL) * 100 / ( SELECT COUNT(*) NUM FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' ) | 1,119 | challenging |
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 |
authors | How many authors have written paper "145 GROWTH HORMONE RECEPTORS AND THE ONSET OF HYPERINSULINEMIA IN THE OBESE ZUCKER RAT: "? | paper "145 GROWTH HORMONE RECEPTORS AND THE ONSET OF HYPERINSULINEMIA IN THE OBESE ZUCKER RAT: " refers to Title like'%145 GROWTH HORMONE RECEPTORS AND THE ONSET OF HYPERINSULINEMIA IN THE OBESE ZUCKER RAT:%' | SELECT COUNT(DISTINCT T2.Name) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = '145 GROWTH HORMONE RECEPTORS AND THE ONSET OF HYPERINSULINEMIA IN THE OBESE ZUCKER RAT: ' | 5,572 | moderate |
authors | In papers with journal IDs from 200 to 300 and with its short name starts with A, what is the percentage of papers with conference ID of 0? | journal ID of 200 to 300 refers to JournalId BETWEEN 200 AND 300; short name starts with A refers to ShortName LIKE 'A%'; Percentage = Divide (Count(ConferenceId = 0), Count(ConferenceId)) * 100 | SELECT CAST(SUM(CASE WHEN T1.ConferenceId = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ConferenceId) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.JournalId BETWEEN 200 AND 300 AND T2.ShortName LIKE 'A%' | 2,219 | challenging |
authors | What is the proportion of the papers that have the keyword "cancer"? Please provide a list of authors and their affiliations. | Proportion refer to DIVIDE(COUNT(Keyword = ’cancer’), COUNT(PaperID)) | SELECT CAST(SUM(CASE WHEN T1.Keyword = 'cancer' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Id), T2.Name, T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId | 6,167 | moderate |
authors | How many papers were published in 2005. Calculate the difference between the number of paper published in 2005 and the number of paper published in the previous year. | published in 2005 refer to Year = 2005; Difference refer to SUBTRACT(SUM(Year = 2005). SUM(Year = 2004)) | SELECT SUM(CASE WHEN Year = 2005 THEN 1 ELSE 0 END) , SUM(CASE WHEN year = 2005 THEN 1 ELSE 0 END) - SUM(CASE WHEN year = 2004 THEN 1 ELSE 0 END) AS diff FROM Paper | 2,655 | moderate |
authors | What are the paper IDs of papers presented in conferences has a homepage starts with "http://www.informatik.uni-trier.de/~ley/db/conf/"? | homepage starts with "http://www.informatik.uni-trier.de/~ley/db/conf/" refers to HomePage LIKE 'http://www.informatik.uni-trier.de/~ley/db/conf/%' | SELECT T1.Id FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.HomePage LIKE 'http://www.informatik.uni-trier.de/~ley/db/conf/%' | 4,794 | moderate |
authors | What was the name of the paper that was published on "IEEE Transactions on Pattern Analysis and Machine Intelligence" in 2011? | 'IEEE Transactions on Pattern Analysis and Machine Intelligence' is the FullName of journal; 2011 refers to Year = '2011'; name of the paper refers to Title of paper | SELECT T2.Title FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'IEEE Transactions on Pattern Analysis and Machine Intelligence' AND T2.Year = 2011 AND T2.Title <> '' | 672 | moderate |
authors | Name the title, year and keyword of the paper which were written by the author ID of 661002 with the affiliation of "Scientific Computing and Imaging Institute, University of Utah, UT 84112, USA" organization. | "661002" is the AuthorId; "Scientific Computing and Imaging Institute, University of Utah, UT 84112, USA" is the Affiliation organization | SELECT T2.Title, T2.Year, T2.Keyword FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.AuthorId = 661002 AND T1.Affiliation = 'Scientific Computing and Imaging Institute, University of Utah, UT 84112, USA' | 80 | moderate |
authors | List the paper title and journal ID which were published under the conference name of "International Symposium of Robotics Research". | "International Symposium of Robotics Research" is the FullName of conference; | SELECT DISTINCT T2.Title, T2.JournalId FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T1.FullName = 'International Symposium of Robotics Research' AND T2.Year = 2003 | 3,869 | moderate |
authors | What are the conference name and journal name of paper written by Shueh-Lin Yau? List down the name of co-authors and provide the title of that paper. | Shueh-Lin Yau is the name of author; | SELECT T1.ConferenceId, T1.JournalId, T2.Name, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id INNER JOIN Journal AS T4 ON T1.JournalId = T4.Id WHERE T2.Name = 'Shueh-Lin Yau' | 2,689 | moderate |
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 |
authors | Calculate the differences of the paper number with the journal name of IWC in 2000 and 2010. | "IWC" is the ShortName of journal; '2000' and '2010' are Year; Difference = Subtract(Count(Paper.Id(Year = 2000)), Count(Paper.Id(Year = 2010))) | SELECT SUM(CASE WHEN T2.Year = 2000 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.Year = 2010 THEN 1 ELSE 0 END) AS DIFF FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.ShortName = 'IWC' | 1,016 | 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 |
authors | Calculate the total average number of papers published from 2002 to 2010 under the conference "Information and Knowledge Engineering". | average number of papers refers to DIVIDE(count(id), 9); published from 2002 to 2010 refers to Year BETWEEN 2002 AND 2010; 'Information and Knowledge Engineering' is the FullName of conference; | SELECT CAST(COUNT(T1.Id) AS REAL) / COUNT(DISTINCT T1.Year) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'Information and Knowledge Engineering' AND T1.Year >= 2002 AND T1.Year <= 2010 | 2,230 | moderate |
authors | List the title and author's name of papers published in the 2007 Neoplasia journal. | published in the 2007 refers to Year = 2007; Neoplasia journal refers to FullName = 'Neoplasia' | SELECT T1.Title, T2.Name 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 T3.FullName = 'Neoplasia' AND T1.Year = 2007 | 5,879 | moderate |
authors | What percentage of journals whose short name begins with ANN were published in the paper database in 1989? | short name begins with ANN refers to ShortName like 'ANN%' ; percentage refers to DIVIDE(COUNT(ShortName like 'ANN%' ), COUNT(id)) * 100%; in 1989 refers to Year = 1989 | SELECT CAST((SUM(CASE WHEN T1.ShortName LIKE 'ANN%' THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T1.ShortName) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T2.Year = 1989 | 451 | moderate |
authors | Please list the titles of the papers published in the journal "Concepts in Magnetic Resonance Part A" in 2008. | journal "Concepts in Magnetic Resonance Part A" refers to FullName = 'Concepts in Magnetic Resonance Part A'; in 2018 refers to Year = 2018 | SELECT T2.Title FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'Concepts in Magnetic Resonance Part A' AND T2.Year = 2008 | 2,859 | moderate |
authors | Among the author who drafted the paper "A Randomized Comparison of Sirolimus- Versus Paclitaxel-Eluting Stent Implantation in Patients With Diabetes Mellitus", which of them is/are affiliated with the Asan Medical Center, University of Ulsan College of Medicine, Seoul, Korea
? | author refers to PaperAuthor.Name; 'A Randomized Comparison of Sirolimus- Versus Paclitaxel-Eluting Stent Implantation in Patients With Diabetes Mellitus' is the title; 'Asan Medical Center, University of Ulsan College of Medicine, Seoul, Korea' is an Affiliation | SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Affiliation = 'Asan Medical Center, University of Ulsan College of Medicine, Seoul, Korea' AND T1.Title = 'A Randomized Comparison of Sirolimus- Versus Paclitaxel-Eluting Stent Implantation in Patients With Diabetes Mellitus' | 4,289 | challenging |
authors | Among the authors of the paper "Stitching videos streamed by mobile phones in real-time", how many of them are affiliated with Cairo Microsoft Innovation Lab? | "FIBER: A Generalized Framework for Auto-tuning Software" is the Title of paper; affiliated refers to Affiliation; University of Tokyo is the affiliation organization | SELECT COUNT(T1.AuthorId) FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Affiliation = 'University of Tokyo' AND T2.Title = 'FIBER: A Generalized Framework for Auto-tuning Software' | 3,941 | moderate |
authors | Among all publications containing keywords 'Turbulent Fluids', what percentage of them was published in the journal named 'Physics of Fluids'? | 'Physics of Fluids' is the FullName of journal; percentage = DIVIDE(SUM(Keyword = 'Turbulent Fluids'), SUM(FullName = 'Physics of Fluids')) as percentage | SELECT CAST(SUM(CASE WHEN T1.Keyword = 'Turbulent Fluids' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.FullName = 'Physics of Fluids' THEN 1 ELSE 0 END) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id | 1,864 | challenging |
authors | Among the author included in the paper of "Inspection resistant memory: Architectural support for security from physical examination", write down the author name and ID who were affiliated with Microsoft Research, USA. | "Inspection resistant memory: Architectural support for security from physical examination" is the title of paper; 'Microsoft Research, USA' is the Affiliation | SELECT T2.Name, T1.Id FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Inspection resistant memory: Architectural support for security FROM physical examination' AND T2.Affiliation = 'Microsoft Research, USA' | 2,662 | moderate |
authors | Under the conference name of MICRO, calculate how many more paper is needed to published in 1971 to 1980 in average by yearly to get equivalent to the number of paper from 1991 to 2000. Write down the title and author name of the paper that were actually published during 1971 to 1980 with the conference name with MICRO. | "MICRO" is the ShortName of conference; in 1971 to 1980 refers to Year BETWEEN '1971' AND '1980'; in 1991 to 2000 refers to Year BETWEEN '1991' AND '2000': Average needed paper = Subtract (Count(PaperId(Year BETWEEN '1991' AND '2000')), Count(PaperId(Year BETWEEN '1971' AND '1980')))/10 | SELECT T2.title, T3.name, T1.FullName FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.id = T2.ConferenceId INNER JOIN PaperAuthor AS T3 ON T1.id = T3.PaperId WHERE T1.ShortName = 'MICRO' AND T2.Year BETWEEN '1971' AND '1980' | 2,537 | challenging |
authors | Give the title and author's name of the papers published between 2000 and 2005 that include the topic optical properties. | published between 2000 and 2005 refers to Year BETWEEN 2000 AND 2005; include the topic optical properties refers to Keyword LIKE '%optical properties%' | SELECT T1.Title, T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Keyword LIKE '%optical properties%' AND T1.Year BETWEEN 2000 AND 2005 AND T1.Title <> '' | 4,767 | moderate |
authors | Among papers that were published in 2005, provide the author name of paper with key words of "LOAD; IDE; SNP; haplotype; asso- ciation studies". | in 2005 refers to Year = '2005'; key words of "LOAD; IDE; SNP; haplotype; asso- ciation studies" refers to Keyword = 'LOAD; IDE; SNP; haplotype; asso- ciation studies' | SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Year = 2005 AND T1.Keyword = 'KEY WORDS: LOAD IDE SNP haplotype asso- ciation studies' | 332 | moderate |
authors | What is the title of the paper published in 2003 by an author with affiliation with Department of Network Science, Graduate School of Information Systems, The University of Electro-Communications? | published in 2003 refers to Year = 2003; 'Department of Network Science, Graduate School of Information Systems, The University of Electro-Communications' is the Affiliation organization | SELECT DISTINCT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Affiliation = 'Department of Network Science, Graduate School of Information Systems, The University of Electro-Communications' AND T2.Year = 2003 | 1,337 | moderate |
authors | Write down homepage URL of journal for paper "364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results". | paper "364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results" refers to Title = '364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results' | SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Title = '364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results' | 870 | moderate |
authors | What is the name of the authors of papers in which conferences have been published whose full name includes the word Workshop? | full name includes the word Workshop refers to FullName LIKE '%Workshop%' | SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id WHERE T3.FullName LIKE '%Workshop%' | 4,561 | moderate |
authors | Write down the title and affiliation of the preprinted paper written by "Roger J.Marshal". | "Roger J. Marshall" is the name of author; preprinted paper refers to ConferenceId = 0 AND JournalId = 0 | SELECT T1.Title, T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Roger J. Marshall' AND T1.ConferenceID = 0 AND T1.JournalID = 0 | 2,868 | moderate |
authors | From year 1991 to 2000, calculate the difference betweeen the total number of papers published under the conference "International Conference on Supercomputing " and "Informatik & Schule"? | From year 1991 to 2000 refers to Year BETWEEN 1991 AND 2000; papers refers to Paper.Id; 'International Conference on Supercomputing' AND 'Informatik & Schule' are the FullName of conference; calculate the difference between the total number of papers of these two conferences refers to SUBTRACT(SUM(Paper.Id where FullName = 'International Conference on Supercomputing'), SUM(Paper.Id where FullName = 'Informatik & Schule')) | SELECT SUM(CASE WHEN T2.FullName = 'Informatik & Schule' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.FullName = 'International Conference on Supercomputing' THEN 1 ELSE 0 END) AS DIFF FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Year > 1990 AND T1.Year < 2001 | 1,478 | challenging |
authors | Write down the author name, affiliation, jounal short name and full name of the paper "Decreased Saliva Secretion and Down-Regulation of AQP5 in Submandibular Gland in Irradiated Rats". | "Decreased Saliva Secretion and Down-Regulation of AQP5 in Submandibular Gland in Irradiated Rats" is the Title of paper | SELECT T2.Name, T2.Affiliation, T3.ShortName, T3.FullName 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.Title = 'Decreased Saliva Secretion and Down-Regulation of AQP5 in Submandibular Gland in Irradiated Rats' | 2,493 | challenging |
authors | What are the journal homepages and author ID of the papers published in 2000 to 2005 with a word "social" in its title? | in 2000 to 2005 refers to Year BETWEEN 2000 AND 2005; a word "social" in its title refers to Title = '%SOCIAL%' | SELECT T3.HomePage, T2.AuthorId 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.Year BETWEEN 2000 AND 2005 AND T1.Title LIKE '%SOCIAL%' | 4,414 | moderate |
authors | What is the average number of papers published in the World Computer Congress each year? | published in the World Computer Congress refers to FullName = 'World Computer Congress'; average refers to DIVIDE(COUNT(FullName = 'World Computer Congress'), COUNT(Id)) | SELECT CAST(SUM(CASE WHEN T2.FullName = 'International Congress Series' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Id) AS Div1, T1.Year FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id GROUP BY T1.YEAR HAVING Div1 != 0 | 1,135 | moderate |
authors | How many times more for the papers that were presented at the "International Conference on Thermoelectrics" conference than "International Conference on Wireless Networks, Communications and Mobile Computing“ conference? | 'International Conference on Thermoelectrics' AND 'International Conference on Wireless Networks, Communications and Mobile Computing' are the FullName of the conference; Papers refers to Paper.Id; Calculation = SUBTRACT(SUM(Paper.Id where FullName = 'International Conference on Thermoelectrics'), SUM(Paper.Id where FullName = 'International Conference on Wireless Networks, Communications and Mobile Computing')) | SELECT CAST(SUM(CASE WHEN T2.FullName = 'International Conference on Thermoelectrics' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.FullName = 'International Conference on Wireless Networks, Communications and Mobile Computing' THEN 1 ELSE 0 END) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id | 5,693 | challenging |
authors | Give the Title and author's name of the books that were preprint in 1997. | in 1997 refers to Year = 1997; books that were preprint refers to ConferenceId = 0 AND JournalId = 0 | SELECT DISTINCT T2.Name, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.ConferenceId = 0 AND T1.JournalId = 0 AND T1.Year = 1997 AND T1.Title <> '' | 948 | moderate |
beer_factory | Among the root beers sold in bottles, how many are sold at the location 38.559615, -121.42243? | in bottles refers to ContainerType = 'Bottle'; location 38.559615, -121.42243 refers to latitude = 38.559615 AND longitude = -121.42243; | SELECT COUNT(T4.BrandID) FROM `transaction` AS T1 INNER JOIN geolocation AS T2 ON T1.LocationID = T2.LocationID INNER JOIN location AS T3 ON T1.LocationID = T3.LocationID INNER JOIN rootbeer AS T4 ON T1.RootBeerID = T4.RootBeerID WHERE T2.Latitude = 38.559615 AND T2.Longitude = -121.42243 AND T4.ContainerType = 'Bottle' | 5,746 | moderate |
beer_factory | Among the customers not subscribed to the mailing list, what percentage has given three or more stars in a review? | not subscribed to the mailing list refers to SubscribedToEmailList = 'FALSE'; percentage = MULTIPLY(DIVIDE(SUM(CustomerID WHERE StarRating > 3), COUNT(CustomerID) WHERE SubscribedToEmailList = 'FALSE'), 1.0); | SELECT CAST(COUNT(CASE WHEN T2.StarRating > 3 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.CustomerID) FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.SubscribedToEmailList = 'FALSE' | 1,231 | moderate |
beer_factory | What is the percentage of 5 star ratings River City brand root beer get? | percentage = MULTIPLY(DIVIDE(SUM(BrandID WHERE StarRating = 5), COUNT(BrandID) WHERE BrandName = 'River City'), 1.0); 5 star ratings refers to StarRating = 5; River City refers to BrandName = 'River City'; | SELECT CAST(COUNT(CASE WHEN T2.StarRating = 5 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.StarRating) FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T1.BrandName = 'River City' | 1,606 | moderate |
beer_factory | What percentage of customers who paid with a Discover Credit Card gave a 3-star rating? | percentage = MULTIPLY(DIVIDE(COUNT(CustomerID WHERE StarRating = 3), COUNT(CustomerID) WHERE CreditCardType = 'Discover'), 100); Discover Credit Card refers to CreditCardType = 'Discover'; 3-star rating refers to StarRating = 3; | SELECT CAST(COUNT(CASE WHEN T1.StarRating = 3 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.CustomerID) FROM rootbeerreview AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.CreditCardType = 'Discover' | 511 | moderate |
beer_factory | How many sweet bottled root beers that do not contain cane sugar were purchased in 2015 through the selling company located in Sac State American River Courtyard? | sweet refers to Honey = 'TRUE'; bottled refers to ContainerType = 'Bottle'; do not contain cane sugar refers to CaneSugar = 'FALSE'; in 2015 refers to PurchaseDate < = '2015-12-31'; Sac State American River Courtyard refers to LocationName = 'Sac State American River Courtyard'; | SELECT COUNT(T1.BrandID) FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID INNER JOIN location AS T3 ON T1.LocationID = T3.LocationID WHERE T3.LocationName = 'Sac State American River Courtyard' AND T1.PurchaseDate LIKE '2015%' AND T2.Honey = 'TRUE' AND T2.CaneSugar = 'FALSE' AND T1.ContainerType = 'Bottle' | 160 | challenging |
beer_factory | How many times did Anna Himes use her Mastercard when paying between 12/25/2014 and 5/20/2016 ? | Mastercard refers to CreditCardType = 'MasterCard'; between 12/25/2014 and 5/20/2016 refers to TransactionDate BETWEEN '2014-12-25' AND '2016-05-20'; | SELECT COUNT(T2.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Anna' AND T1.Last = 'Himes' AND T2.CreditCardType = 'MasterCard' AND T2.TransactionDate BETWEEN '2014-12-25' AND '2016-05-20' | 4,471 | moderate |
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 |
beer_factory | From which cities are the customers who gave 5 stars in their reviews in November 2012? | 5 stars refers to StarRating = 5; in November 2012 refers to ReviewDate LIKE '2012-11%'; | SELECT DISTINCT T1.City FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating = 5 AND T2.ReviewDate BETWEEN '2012-11-01' AND '2012-11-30' | 3,148 | moderate |
beer_factory | What is the difference in the average number of sales per day of root beer brands that contain honey and that don’t contain honey. | difference in the average = SUBTRACT(DIVIDE(MULTIPLY(SUM(Honey = 'TRUE'), 1.0), COUNT(TransactionDate)), DIVIDE(MULTIPLY(SUM(Honey = 'FALSE'), 1.0), COUNT(TransactionDate))); contain honey refers to Honey = 'TRUE'; don’t contain honey refers to Honey = 'FALSE' | SELECT (CAST(SUM(CASE WHEN T1.Honey = 'TRUE' THEN 1 ELSE 0 END) AS REAL) / COUNT(DISTINCT T3.TransactionDate)) - (CAST(SUM(CASE WHEN T1.Honey <> 'TRUE' THEN 1 ELSE 0 END) AS REAL) / COUNT(DISTINCT T3.TransactionDate)) FROM rootbeerbrand AS T1 INNER JOIN rootbeer AS T2 ON T1.BrandID = T2.BrandID INNER JOIN `transaction` AS T3 ON T2.RootBeerID = T3.RootBeerID | 3,798 | challenging |
beer_factory | In the reviews of September 2014. Which brand of beers obtained the highest star ratings? | September 2014 refers to ReviewDate LIKE '2014-09%'; brand of beers refers to BrandName; highest star ratings refers to MAX(StarRating); | SELECT DISTINCT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.StarRating = 5 AND T2.ReviewDate BETWEEN '2014-09-01' AND '2014-09-30' | 4,814 | moderate |
beer_factory | What is the full name of the customer that had made the most transactions in August, 2014? | full name = First, Last; made the most transactions refers to MAX(COUNT(TransactionID)); in August, 2014 refers to SUBSTR(TransactionDate, 1, 4) = '2014' AND SUBSTR(TransactionDate, 6, 2) = '08'; | SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y-%m', T2.TransactionDate) = '2014-08' GROUP BY T1.CustomerID ORDER BY COUNT(T2.CustomerID) DESC LIMIT 1 | 1,202 | moderate |
beer_factory | How many root beers did Tom Hanks purchase between 2015 to 2016? | between 2015 to 2016 refers to TransactionDate > = '2015-01-01' AND TransactionDate < '2016-12-31'; | SELECT COUNT(T2.RootBeerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Tom' AND T1.Last = 'Hanks' AND T2.TransactionDate BETWEEN '2015-01-01' AND '2016-12-31' | 5,029 | moderate |
beer_factory | Please list the brands of all the root beer that Frank-Paul Santangelo had purchased on 2014/7/7. | brands of the root beer refers to BrandName; purchased on 2014/7/7 refers to transactiondate = '2014-07-07'; | SELECT DISTINCT T4.BrandName 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 T1.First = 'Frank-Paul' AND T1.Last = 'Santangelo' AND T2.TransactionDate = '2014-07-07' | 6,310 | moderate |
beer_factory | At what latitude is the Thomas Kemper brand beer consumed the most? | Thomas Kemper refers to BrandName = 'Thomas Kemper'; latitude the beer is consumed the most refers to MAX(COUNT(Latitude)); | SELECT T3.Latitude FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID INNER JOIN geolocation AS T3 ON T1.LocationID = T3.LocationID WHERE T2.BrandName = 'Thomas Kemper' GROUP BY T3.Latitude ORDER BY COUNT(T1.BrandID) DESC LIMIT 1 | 4,396 | moderate |
beer_factory | Between Sac State Union and Sac State American River Courtyard, which location sold the most Dog n Suds root beer? | Between Sac State Union and Sac State American River Courtyard refers to LocationName IN('Sac State American River Courtyard', 'Sac State Union'); Dog n Suds refers to BrandName = 'Dog n Suds'; sold the most root beer refers to MAX(COUNT(BrandID)); | SELECT T3.LocationName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID INNER JOIN location AS T3 ON T1.LocationID = T3.LocationID WHERE T2.BrandName = 'Dog n Suds' AND T3.LocationName IN ('Sac State American River Courtyard', 'Sac State Union') GROUP BY T1.LocationID ORDER BY COUNT(T1.BrandID) DESC LIMIT 1 | 5,857 | challenging |
beer_factory | How many transactions had Frank-Paul Santangelo made in July, 2014? | in July, 2014 refers to SUBSTR(TransactionDate, 1, 4) = '2014' AND SUBSTR(TransactionDate, 6, 2) = '07'; | SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Frank-Paul' AND T1.Last = 'Santangelo' AND STRFTIME('%Y-%m', T2.TransactionDate) = '2014-07' | 2,911 | moderate |
beer_factory | For the customer who gave a 3 star rating to Frostie brand on 2014/4/24, did the user permit the company to send regular emails to him/her? | 3 star rating refers to StarRating = 3; Frostie refers to BrandName = 'Frostie'; if SubscribedToEmailList = 'TRUE', it means the user permit the company to send regular emails to him/her; if SubscribedToEmailList = FALSE', it means the user did not permit the company to send regular emails to him/her; rating on 2014/4/24 refers to ReviewDate = '2014-04-24'; | SELECT CASE WHEN T1.SubscribedToEmailList LIKE 'TRUE' THEN 'YES' ELSE 'NO' END AS result FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeerbrand AS T3 ON T2.BrandID = T3.BrandID WHERE T2.StarRating = 3 AND T3.BrandName = 'Frostie' AND T2.ReviewDate = '2014-04-24' | 3,612 | moderate |
beer_factory | How many canned A&W were purchased in 2016? | canned refers to ContainerType = 'Can'; A&W refers to BrandName = 'A&W'; in 2016 refers to PurchaseDate > = '2016-01-01' AND PurchaseDate < = '2016-12-31'; | SELECT COUNT(T1.BrandID) FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T1.ContainerType = 'Can' AND T2.BrandName = 'A&W' AND T1.PurchaseDate LIKE '2016%' | 1,109 | moderate |
beer_factory | How many Henry Weinhard's were bought by Nicholas Sparks? | Henry Weinhard's refers to BrandName = 'Henry Weinhard''s'; | SELECT COUNT(T1.CustomerID) 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 T1.First = 'Nicholas' AND T1.Last = 'Sparks' AND T4.BrandName LIKE 'Henry Weinhard%s' | 3,184 | moderate |
beer_factory | Calculate the total purchases made by customers using their Visa credit cards in the Sac State American River Courtyard between 6/3/2014 and 11/27/2015. | total purchases = SUM(PurchasePrice); Visa credit card refers to CreditCardType = 'Visa'; Sac State American River Courtyard refers to LocationName = 'Sac State American River Courtyard'; between 6/3/2014 and 11/27/2015 refers to TransactionDate BETWEEN '2014-06-03' AND '2015-11-27'; | SELECT SUM(T1.PurchasePrice) FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.LocationName = 'Sac State American River Courtyard' AND T1.CreditCardType = 'Visa' AND T1.TransactionDate BETWEEN '2014-06-03' AND '2015-11-27' | 854 | moderate |
beer_factory | What is the average star rating given by female customers to brand ID 10018 from 1/25/2015 to 3/10/2015? | average star rating = AVG(StarRating); female customers refers to Gender = 'F; from 1/25/2015 to 3/10/2015 refers to ReviewDate BETWEEN '2015-01-25' AND '2015-03-10'; | SELECT AVG(T2.StarRating) FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.BrandID = 10018 AND T1.Gender = 'F' AND T2.ReviewDate BETWEEN '2013-01-25' AND '2015-03-10' | 4,656 | moderate |
End of preview. Expand
in Dataset Viewer.
README.md exists but content is empty.
- Downloads last month
- 346