Database: legislator
Question: List the full name of all the senior senators in year 2013.
Evidence: full name refers to official_full_name; senior refers to state_rank = 'senior'; senators refers to type = 'sen'; 2013 refers to start LIKE '2013%'
SQL: SELECT T2.official_full_name FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.state_rank = 'senior' AND T1.type = 'sen' AND T1.start LIKE '2013%'

Database: student_loan
Question: Among the students enlisted in marines, how many of them are disabled?
Evidence: enlisted in marines refers to organ = 'marines';
SQL: SELECT COUNT(T1.name) FROM enlist AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.organ = 'marines'

Database: authors
Question: What is the title and journal homepage of the latest published paper?
Evidence: latest published paper refers to Max(Year)
SQL: SELECT T1.Title, T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id ORDER BY T1.Year DESC LIMIT 1

Database: authors
Question: Which journal was the paper "Education, democracy and growth" published on? Give the full name of the journal.
Evidence: 'Education, democracy and growth' is the title of a paper
SQL: SELECT T1.FullName FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T2.Title = 'Education, democracy and growth'

Database: soccer_2016
Question: Of the matches that were won by runs by team 1, what percentage have team 1 won the toss and decided to field?
Evidence: won by runs refers to Win_Type = 'runs'; won the toss and decided to field refers to Toss_Winner and Toss_Name = 'field'; percentage = divide(count(Team_1) when Match_Winner = Team_1 and Toss_Winner = Team_1, count(Team_1)) as percentage
SQL: SELECT CAST(COUNT(CASE WHEN T1.Team_1 = T1.Match_Winner = T1.Toss_Winner THEN 1 ELSE 0 END) AS REAL) * 100 / TOTAL(T1.Team_1) FROM `Match` AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id INNER JOIN Toss_Decision AS T3 ON T1.Toss_Decide = T3.Toss_Id WHERE T3.Toss_Name = 'field' AND T2.Win_Type = 'runs'

Database: address
Question: Name both the alias and the bad alias of zip code 38015.
SQL: SELECT T1.alias, T2.bad_alias FROM alias AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 38015

Database: food_inspection_2
Question: What type of inspection was done at John Schaller?
Evidence: type of inspection refers to inspection_type; John Schaller refers to dba_name = 'JOHN SCHALLER'
SQL: SELECT DISTINCT T2.inspection_type FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.dba_name = 'JOHN SCHALLER'

Database: restaurant
Question: What is the rating of each restaurant reviews on Atlantic Ave?
Evidence: Atlantic Ave refers to street_name = 'atlantic ave'; rating refers to review
SQL: SELECT T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'atlantic ave'

Database: shipping
Question: How much is the annual revenue of the customer with the most number of shipments?
Evidence: customer with the most number of shipment refers to cust_id where Max(Count(ship_id))
SQL: SELECT T2.annual_revenue FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_id ORDER BY COUNT(T1.cust_id) DESC LIMIT 1

Database: retail_world
Question: Please list the phone numbers of the suppliers of the products that have a higher units on order than units in stock.
Evidence: UnitsInStock < UnitsOnOrder;
SQL: SELECT DISTINCT T2.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.UnitsInStock < T1.UnitsOnOrder

Database: professional_basketball
Question: What is the percentage of player who won "All-Defensive First Team" from 1980 - 2000 is from 'NY'.
Evidence: "All-Defensive First Team" is the award; ' NY' is the birthState; 1980 to 2000 refers to year between 1980 and 2000; percentage = Divide (Count(playerID where birthState = 'NY'), Count(playerID)) * 100
SQL: SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T1.birthState = 'NY' AND T2.award = 'All-Defensive First Team' AND T2.year BETWEEN 1980 AND 2000

Database: simpson_episodes
Question: What is the total number of episode with a rating below 7?
Evidence: rating below 7 refers to rating < 7
SQL: SELECT COUNT(episode_id) FROM Episode WHERE rating < 7;

Database: shipping
Question: Among the shipments to a customer from Texas, what percentage of the shipments shipped in 2017?
Evidence: "Texas" refers to state = 'TX'; shipped in 2017 refers to CAST(ship_date AS DATE) = 2017; percentage = Divide (Count (ship_id where CAST(ship_date AS DATE) = 2017), Count (ship_id)) * 100
SQL: SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T1.ship_date) = '2017' THEN 1 ELSE 0 END) AS REAL ) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state = 'TX'

Database: university
Question: In which year did university ID 1 have the most students?
Evidence: have the most students refers to MAX(num_students)
SQL: SELECT year FROM university_year WHERE university_id = 1 ORDER BY num_students DESC LIMIT 1

Database: soccer_2016
Question: Tally the player IDs of "Man of the Series" awardees for the seasons from 2011 to 2015.
Evidence: seasons from 2011 to 2015 refers to 2011 < Season_Year < 2015
SQL: SELECT Man_of_the_Series FROM Season WHERE 2011 < Season_Year < 2015

Database: genes
Question: Of the genes whose phenotype and motif are nucleic acid metabolism defects, PS00107, what percentage perform positive interaction with another gene?
Evidence: Percentage of no interaction = [count(nucleic acid metabolism, PS00107, no interaction) / count(nucleic acid metabolism, PS00107) * 100%
SQL: SELECT CAST(SUM(IIF(T2.Expression_Corr > 0, 1, 0)) AS REAL) * 100 / COUNT(T2.GeneID1) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T1.Phenotype = 'Nucleic acid metabolism defects' AND T1.Motif = 'PS00107'

Database: soccer_2016
Question: Which team did CK Kapugedera belong to? How many matches did he play?
Evidence: team refers to Team_Name; CK Kapugedera refers to Player_Name = 'CK Kapugedera'
SQL: SELECT T3.Team_Name, COUNT(T2.Match_Id) FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T2.Player_Id = T1.Player_Id INNER JOIN Team AS T3 ON T3.Team_Id = T2.Team_Id WHERE T1.Player_Name = 'CK Kapugedera'

Database: world_development_indicators
Question: Among the countries who uses the 1968 System of National Accounts methodology, how many are in the Middle East & North Africa? Name the country with the highest CO2 emissions from solid fuel consumption in kiloton.
Evidence: uses the 1968 System of National Accounts methodology refers to SystemOfNationalAccounts = '1968 System of National Accounts methodology'; in the Middle East & North Africa refers to Region = 'Middle East & North Africa'; the highest CO2 emissions from solid fuel consumption in kiloton refers to max(value where IndicatorName = 'CO2 emissions from solid fuel consumption (kt)')
SQL: SELECT COUNT(DISTINCT T1.CountryCode) FROM indicators AS T1 INNER JOIN country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Middle East & North Africa' AND T2.SystemOfNationalAccounts = 'Country uses the 1968 System of National Accounts methodology.' AND T1.IndicatorName = 'CO2 emissions FROM solid fuel consumption (kt)' UNION SELECT * FROM ( SELECT T1.CountryName FROM indicators AS T1 INNER JOIN country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Middle East & North Africa' AND T2.SystemOfNationalAccounts = 'Country uses the 1968 System of National Accounts methodology.' AND T1.IndicatorName = 'CO2 emissions FROM solid fuel consumption (kt)' GROUP BY T1.CountryName ORDER BY SUM(T1.value) DESC LIMIT 1 )