Database: airline
Question: From August 10 to August 20, 2018, how many cancelled flights of air carrier named Spirit Air Lines: NK are there?
Evidence: From August 10 to August 20, 2018 refers to FL_DATE BETWEEN '2018/8/10' AND '2018/8/20'; cancelled flights refers to CANCELLED = 1; Trans Southern Airways: 'Spirit Air Lines: NK' refers to Description = 'Spirit Air Lines: NK';
SQL: SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Spirit Air Lines: NK' AND T2.CANCELLED = 0 AND T2.FL_DATE BETWEEN '2018/8/10' AND '2018/8/20'

Database: books
Question: How many orders in 2022 have Iran as their destinations?
Evidence: Iran as their destination refers to country_name = 'Iran'; orders in 2022 refers to order_date LIKE '2022%'
SQL: SELECT COUNT(*) FROM country AS T1 INNER JOIN address AS T2 ON T1.country_id = T2.country_id INNER JOIN cust_order AS T3 ON T3.dest_address_id = T2.address_id WHERE T1.country_name = 'Iran' AND STRFTIME('%Y', T3.order_date) = '2022'

Database: movies_4
Question: Give the genre and popularity of movies whose revenue is at least 120,000,000 between 2012 and 2015.
Evidence: genre refers to genre_name; revenue is at least 120,000,000 refers to revenue > = 120000000; between 2012 and 2015 refers to release_date BETWEEN '2012-01-01' AND '2015-12-31'
SQL: SELECT T3.genre_name, T1.popularity FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T1.revenue > 120000000 AND T1.release_date BETWEEN '2012-01-01' AND '2015-12-31'

Database: synthea
Question: How many patients with shellfish allergies died when they were under 12 years old? Please give their full names.
Evidence: shellfish allergies refers to allergies.DESCRIPTION = 'Shellfish allergy'; died under 12 years old = DIVIDE(SUBTRACT(julianday(patients.deathdate), julianday(patients.birthdate)), 365) < 12; full names = first, last;
SQL: SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Shellfish allergy' AND CAST((strftime('%J', T1.deathdate) - strftime('%J', T1.birthdate)) AS REAL) / 365 < 12

Database: cars
Question: Among the cars with an acceleration of over 10 miles per squared hour, how many of them cost more than $20000 and less than $30000?
Evidence: an acceleration of over 10 miles per squared hour refers to acceleration > 10; cost more than $20000 and less than $30000 refers to price < 30000 AND price > 20000
SQL: SELECT COUNT(*) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.acceleration > 10 AND T2.price BETWEEN 20000 AND 30000

Database: college_completion
Question: What is the website address of the institution with the highest number of White degree-seeking students at 2-year institutions in 2008?
Evidence: website address refers to site; White refers to race = 'W'; degree-seeking students at 2-year institutions refers to cohort = '2y all'; in 2008 refers to year = '2008';
SQL: SELECT T1.site FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.race = 'W' AND T2.cohort = '2y all' AND T2.year = 2008 ORDER BY T2.grad_cohort DESC LIMIT 1

Database: professional_basketball
Question: For the latest passing player who could play all the positions in the court, how many points did he have in his career?
Evidence: the latest passing refers to max(season_id); play all the positions refers to pos like '%C%' or pos like '%F%' or pos like '%G%'
SQL: SELECT SUM(T2.points) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T1.pos = 'C-F-G' GROUP BY T2.playerID, T2.year ORDER BY T2.year DESC LIMIT 1

Database: language_corpus
Question: List out the title of the word have id less than 20.
Evidence: word have id less than 20 refers to wid < 20;
SQL: SELECT DISTINCT T1.title FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T2.wid < 20

Database: public_review_platform
Question: What is the closing and opening time of businesses located at Tempe with highest star rating?
Evidence: located at Tempe refers to city = 'Tempe'; highest star rating refers to max(stars)
SQL: SELECT T2.closing_time, T2.opening_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Tempe' ORDER BY T1.stars DESC LIMIT 1

Database: law_episode
Question: How many episodes are credited to Jerry Orbach?
SQL: SELECT COUNT(T2.person_id) FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T2.name = 'Jerry Orbach'

Database: music_platform_2
Question: Indicate the slug and the itunes url of the podcast whose review content was written Can't stop listening.
Evidence: review content was written Can't stop listening refers to content = 'Can't stop listening'
SQL: SELECT slug, itunes_url FROM podcasts WHERE podcast_id IN ( SELECT podcast_id FROM reviews WHERE content = 'Can''t stop listening' )

Database: talkingdata
Question: How many male users have a Galaxy Note 3?
Evidence: male refers to gender = 'M'; Galaxy Note 3 refers to device_model = 'Galaxy Note 3';
SQL: SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'Galaxy Note 3' AND T1.gender = 'M'

Database: disney
Question: Name the most recent movie directed by Chris Buck. Which of his movies was more successful in terms of grossing? Use the current gross for comparison.
Evidence: Chris Buck refers to director = 'Chris Buck'; the most recent movie refers to movie_title where MAX(release_date); current gross refers to inflation_adjusted_gross; more successful movie refers to MAX(inflation_adjusted_gross);
SQL: SELECT T1.movie_title, MAX(T1.release_date), MAX(T1.inflation_adjusted_gross) FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Chris Buck'

Database: college_completion
Question: Tell the name of school in "NJ" that could get the bachelor's degree with highest students number.
Evidence: name of school refers to chronname; NJ refers to state_abbr = 'NJ'; bachelor's degree refers to level = '4-year'; highest students number refers to MAX(student_count);
SQL: SELECT DISTINCT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.state = T1.state WHERE T2.state_abbr = 'NJ' AND T1.level = '4-year' AND T1.student_count = ( SELECT MAX(T1.student_count) FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.state = T1.state WHERE T2.state_abbr = 'NJ' AND T1.level = '4-year' )

Database: authors
Question: Give the number of papers that were published on "IEEE Transactions on Nuclear Science" in 1999.
Evidence: 'IEEE Transactions on Nuclear Science' is the FullName of journal; 1999 refers to Year = '1999'; papers refers to Paper.Id
SQL: SELECT COUNT(T2.Id) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'IEEE Transactions on Nuclear Science' AND T2.Year = 1999

Database: address
Question: Give the alias of the cities with an Asian population of 7.
Evidence: Asian population of 7 refers to asian_population = 7;
SQL: SELECT T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.asian_population = 7

Database: menu
Question: List down the page numbers for menu with dishes on the right upper corner.
Evidence: on the right upper corner refers to xpos > 0.75 AND ypos < 0.25;
SQL: SELECT T2.page_number FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id INNER JOIN MenuItem AS T3 ON T2.id = T3.menu_page_id WHERE T3.xpos > 0.75 AND T3.ypos < 0.25