Database: synthea
Question: What is the social security number and address of the patient who encountered viral sinusitis symptoms on 6/13/2008?
Evidence: social security number refers to ssn; encountered viral sinusitis refers to encounters.REASONDESCRIPTION = 'Viral sinusitis (disorder)'; on 6/13/2008 refers to encounters.DATE = '2008-06-13';
SQL: SELECT T1.ssn, T1.address FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T2.DATE = '2008-06-13' AND T2.REASONDESCRIPTION = 'Viral sinusitis (disorder)' AND T2.DESCRIPTION = 'Encounter for symptom'

Database: simpson_episodes
Question: Which crew member of the simpson 20s is the oldest?
Evidence: oldest refers to Min(birthdate)
SQL: SELECT name FROM Person WHERE birthdate IS NOT NULL ORDER BY birthdate ASC LIMIT 1;

Database: law_episode
Question: Who was credited as "technical advisor" in the episode titled "Cherished"?
Evidence: who refers to name; credited refers to credited = 'true'; as "technical advisor" refers to role = 'technical advisor'; titled "Cherished" refers to title = 'Cherished'
SQL: SELECT T3.name FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T1.title = 'Cherished' AND T2.credited = 'true' AND T2.role = 'technical advisor'

Database: cookbook
Question: How many calories does the recipe "Raspberry Chiffon Pie" contain?
Evidence: Raspberry Chiffon Pie refers to title
SQL: SELECT T2.calories FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Raspberry Chiffon Pie'

Database: simpson_episodes
Question: How many episodes have won the award for Outstanding Animated Program (Programming Under One Hour) with less than 100 votes? Calculate the percentage of episodes with less than 100 votes out of total episodes.
Evidence: less than 100 votes refers to votes < 100; percentage refers to DIVIDE(COUNT(episode_id when votes < 100), COUNT(episode_id)) * 100%
SQL: SELECT SUM(CASE WHEN T2.votes < 100 THEN 1 ELSE 0 END) AS num , CAST(SUM(CASE WHEN T2.votes < 100 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Award AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Episode AS T3 ON T1.episode_id = T3.episode_id WHERE T1.award = 'Outstanding Animated Program (For Programming Less Than One Hour)';

Database: student_loan
Question: How many female students are disabled?
Evidence: females students are disabled refers to name that appeared in both disabled and male tables
SQL: SELECT COUNT(name) FROM disabled WHERE name NOT IN ( SELECT name FROM male )

Database: european_football_1
Question: Which team was the home team in the match of the Bundesliga division on 2020/10/2?
Evidence: Bundesliga is the name of division; Date = '2020/10/2';
SQL: SELECT T1.HomeTeam FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.Date = '2020-10-02' AND T2.name = 'Bundesliga'

Database: student_loan
Question: Name all disabled students that are enrolled in SMC.
Evidence: enrolled in SMC refers to school = 'smc';
SQL: SELECT T2.name FROM enrolled AS T1 INNER JOIN disabled AS T2 ON T1.`name` = T2.`name` WHERE T1.school = 'smc'

Database: world_development_indicators
Question: List out the long name of countries using series code as DT.DOD.DSTC.CD
SQL: SELECT T1.LongName FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.SeriesCode = 'DT.DOD.DSTC.CD'

Database: legislator
Question: State all the district that Benjamin Contee has served before.
SQL: SELECT T2.district FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Benjamin' AND T1.last_name = 'Contee'

Database: synthea
Question: Count all of the living patients that had a stroke.
Evidence: if deathdate is null, it means this patient is still alive or living; stroke refers to conditions where DESCRIPTION = 'Stroke';
SQL: SELECT COUNT(DISTINCT T2.patient) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.description = 'Stroke' AND T2.deathdate IS NULL

Database: cs_semester
Question: List the research assistants' full names, capabilities and GPAs who were under the supervision of Merwyn Conkay.
Evidence: research assistant refers to the student who serves for research where the abbreviation is RA; full names = f_name, l_name;
SQL: SELECT T3.f_name, T3.l_name, T2.capability, T3.gpa FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T1.first_name = 'Merwyn' AND T1.last_name = 'Conkay'

Database: chicago_crime
Question: What kind of location in Austin reported the most number of crimes?
Evidence: "Austin" is the district_name; the most number of crime refers to Max(Count(case_number)); kind of location refers to location_description
SQL: SELECT T2.location_description FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no WHERE T1.district_name = 'Austin' GROUP BY T2.location_description ORDER BY COUNT(T2.case_number) DESC LIMIT 1

Database: donor
Question: What is the percentage of payment methods of donations made in March 2013?
Evidence: made in March 2013 refers to substr(donation_timestamp,1,7) = '2013-03'; percentage refers to DIVIDE(SUM(payment_method made in March 2013), SUM(payment_method))*100
SQL: SELECT payment_method , CAST(COUNT(donationid) AS REAL) * 100 / 51090 FROM donations WHERE donation_timestamp LIKE '2013-03%' GROUP BY payment_method

Database: simpson_episodes
Question: Calculate the total votes of episodes that Adam Kuhlman had involved.
Evidence: Adam Kuhlman had involved refers to person = 'Adam Kuhlman'
SQL: SELECT SUM(T1.votes) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.person = 'Adam Kuhlman';

Database: retails
Question: How many suppliers from Germany have left a comment with 'carefully regular packages'?
Evidence: Germany is nation name which refers to n_name = 'GERMANY'; comment with 'carefully regular packages' refers to s_comment LIKE 'carefully regular packages%'
SQL: SELECT COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T2.n_name = 'GERMANY' AND T1.s_comment LIKE '%carefully regular packages%'

Database: public_review_platform
Question: What is the total number of active businesses in AZ with a low review count?
Evidence: active businesses refers to active = 'true'; in AZ refers to state = 'AZ'

SQL: SELECT COUNT(business_id) FROM Business WHERE state LIKE 'AZ' AND active LIKE 'True' AND review_count LIKE 'low'

Database: sales_in_weather
Question: Give the id of the bestsellers of store no.1 on 2012/1/1.
Evidence: store no. 1 refers to store_nbr = 1; on 2012/1/1 refers to date = '2012-01-01'; best seller refers to Max(units); ID refers to item_nbr
SQL: SELECT item_nbr FROM sales_in_weather WHERE `date` = '2012-01-01' AND store_nbr = 1 ORDER BY units DESC LIMIT 1

Database: soccer_2016
Question: Among the matches held in Mumbai, how many percent of them were held in Wankhede Stadium?
Evidence: Mumbai refers to City_Name = 'Mumbai'; Wankhede Stadium refers to Venue_Name = 'Wankhede Stadium'; percent = divide(count(Match_Id where Venue_Name = 'Wankhede Stadium'), count(Match_Id)) * 100% where City_Name = 'Mumbai'
SQL: SELECT CAST(SUM(CASE WHEN T2.Venue_Name = 'Wankhede Stadium' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.Match_Id) FROM City AS T1 INNER JOIN Venue AS T2 ON T2.City_Id = T1.City_Id INNER JOIN Match AS T3 ON T3.Venue_Id = T2.Venue_Id WHERE T1.City_Name = 'Mumbai'

Database: legislator
Question: How many of the legislators are male?
Evidence: male refers to gender_bio = 'M';
SQL: SELECT COUNT(*) FROM current WHERE gender_bio = 'M'