Database: authors
Question: What is the author ID and their affiliations of authors of the papers with a journal ID of 0 and published in 2009.
Evidence: published in 2009 refers to Year = 2009; journal ID of 0 refers to JournalId = 0
SQL: SELECT DISTINCT T2.AuthorId, T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.JournalId = 0 AND T1.Year = 2009 AND T2.Affiliation IS NOT NULL

Database: public_review_platform
Question: How many "Good for Kids" Yelp_Businesses are open everyday of the week?
Evidence: Good for Kids refers to attribute_name = 'Good for Kids'and attribute_value = 'true'; open everyday refers to day_id between 1 and 7
SQL: SELECT COUNT(T1.business_id) FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business_Attributes AS T3 ON T1.business_id = T3.business_id INNER JOIN Attributes AS T4 ON T4.attribute_id = T4.attribute_id WHERE T2.day_id IN (1, 2, 3, 4, 5, 6, 7) AND T4.attribute_name = 'Good for Kids' AND T3.attribute_value = 'true'

Database: address
Question: What is the area code of Phillips county in Montana?
Evidence: "PHILLIPS" is the county; 'Montana' is the name of state
SQL: SELECT DISTINCT T1.area_code FROM area_code AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code INNER JOIN state AS T3 ON T2.state = T3.abbreviation WHERE T2.county = 'PHILLIPS' AND T3.name = 'Montana'

Database: law_episode
Question: Where is the place of birth of the actor with the number nm0007064 who has not been credited for playing the role of a "Narrator"?
Evidence: place of birth refers to birth_place; actor with the number nm0007064 refers to person_id = 'nm007064'; has not been credited refers to credited = ''; the role of a "Narrator" refers to role = 'narrator'
SQL: SELECT DISTINCT T1.birth_place FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.person_id = T2.person_id WHERE T1.person_id = 'nm0007064' AND T2.role = 'Narrator' AND T2.credited = 'false'

Database: synthea
Question: List out patient names with calcium deficiency.
Evidence: patient names = first, last; calcium deficiency refers to observations.DESCRIPTION = 'Calcium' and observations.VALUE < 8.6;
SQL: SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Calcium' AND T2.VALUE < 8.6

Database: soccer_2016
Question: Calculate the win rate of the team "Chennai Super Kings".
Evidence: team "Chennai Super Kings" refers to Team_Name = 'Chennai Super Kings'; win rate = divide(count(Match_Id where Match_Winner = 3), count(Match_Id)) * 100%
SQL: SELECT CAST(SUM(CASE WHEN T1.Match_Winner = 3 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Match_Id) FROM Match AS T1 INNER JOIN Team AS T2 ON T2.Team_Id = T1.Team_1 INNER JOIN Team AS T3 ON T3.Team_Id = T1.Team_2 WHERE T2.Team_Name = 'Chennai Super Kings' OR T3.Team_Name = 'Chennai Super Kings'

Database: food_inspection_2
Question: What is the total number of establishments with the highest risk level?
Evidence: total number of establishments with the highest risk level = count(max(risk_level))
SQL: SELECT COUNT(license_no) FROM establishment WHERE risk_level = 3

Database: menu
Question: Which menu page of "Ritz Carlton" has the biggest height?
Evidence: Ritz Carlton is a name of menu; biggest height refers to MAX(full_height);
SQL: SELECT T1.page_number FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id WHERE T2.name = 'Ritz Carlton' ORDER BY T1.full_height DESC LIMIT 1

Database: movies_4
Question: Tell the language of the movie "C'era una volta il West".
Evidence: language refers to language_name; movie "C'era una volta il West" refers to title = 'C''era una volta il West'
SQL: SELECT T3.language_name FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T1.title LIKE 'C%era una volta il West'

Database: restaurant
Question: Give the review of the restaurant at 430, Broadway.
Evidence: 430 Broadway refers to street_num = 430 and street_name = 'Broadway'
SQL: SELECT T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'Broadway' AND T2.street_num = 430

Database: authors
Question: What is the paper "Stitching videos streamed by mobile phones in real-time" about?
Evidence: "Stitching videos streamed by mobile phones in real-time" is the Title of paper; what the paper is about refers to Keywords
SQL: SELECT Keyword FROM Paper WHERE Title = 'Stitching videos streamed by mobile phones in real-time'

Database: retails
Question: Which line item with the highest quantity is shipped by air?
Evidence: line item refers to l_linenumber; the highest quantity refers to max(l_quantity); shipped by air refers to l_shipmode = 'AIR'
SQL: SELECT l_linenumber FROM lineitem WHERE l_shipmode = 'AIR' ORDER BY l_quantity DESC LIMIT 1

Database: soccer_2016
Question: How many times did the matches were held in MA Chidambaram Stadium from 5/9/2009 to 8/8/2011?
Evidence: MA Chidambaram Stadium refers to Venue_Name = 'MA Chidambaram Stadium' ; from 5/9/2009 to 8/8/2011 refers to Match_Date between '2009-05-09' and '2011-08-08'
SQL: SELECT SUM(CASE WHEN Venue_Name = 'MA Chidambaram Stadium' THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id WHERE Match_Date BETWEEN '2009-05-09' AND '2011-08-08'

Database: chicago_crime
Question: Please list the location coordinates of all the incidents that had happened in the ward represented by alderman Pat Dowell.
Evidence: location coordinates refers to latitude, longitude
SQL: SELECT T2.latitude, T2.longitude FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T1.alderman_first_name = 'Pat' AND T1.alderman_last_name = 'Dowell' AND T2.latitude IS NOT NULL AND T2.longitude IS NOT NULL

Database: image_and_language
Question: How many images have at least one pair of object samples with the relation "parked on"?
Evidence: How many images have at least one pair of object samples with the relation "parked on" refers to count(IMG_ID) where OBJ1_SAMPLE_ID ! = OBJ2_SAMPLE_ID and PRED_CLASS = 'parked on'
SQL: SELECT SUM(CASE WHEN T1.PRED_CLASS = 'parked on' THEN 1 ELSE 0 END) FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID

Database: human_resources
Question: Please list the social security numbers of all the employees who work in California.
Evidence: social security numbers refers to ssn; California refers to state = 'CA'
SQL: SELECT T1.ssn FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.state = 'CA'

Database: ice_hockey_draft
Question: Among all penalty minutes picked up by Ak Bars Kazan in the 1999-2000 season, identify the percentage picked up by Yevgeni Muratov.
Evidence: penalty minutes refers to PIM; Ak Bars Kazan refers to TEAM = 'Ak Bars Kazan'; percentage = MULTIPLY(DIVIDE(SUM(PIM WHERE PlayerName = 'Yevgeni Muratov'), SUM(PIM)), 100.0); 1999-2000 season refers to SEASON = '1999-2000';
SQL: SELECT CAST(SUM(CASE WHEN T2.PlayerName = 'Yevgeni Muratov' THEN T1.PIM ELSE 0 END) AS REAL) * 100 / SUM(T1.PIM) FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1999-2000' AND T1.TEAM = 'Ak Bars Kazan'

Database: synthea
Question: Give the number of claims did Ms. Abbie Cole have in the year of 2011.
Evidence: in the year of 2011 refers to BILLABLEPERIOD between '2010-12-31' and '2012-01-01';
SQL: SELECT COUNT(T2.BILLABLEPERIOD) FROM patients AS T1 INNER JOIN claims AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Abbie' AND T1.last = 'Cole' AND T2.BILLABLEPERIOD BETWEEN '2010-12-31' AND '2012-01-01'