Database: student_loan
Question: List out student names that enrolled in two schools and two organizations?
Evidence: enrolled in two schools refers to COUNT(school) = 2; two organizations refers to COUNT(organ) = 2;
SQL: SELECT T.name FROM ( SELECT T1.name, COUNT(T1.organ) AS num FROM enlist AS T1 INNER JOIN enrolled AS T2 ON T1.name = T2.name GROUP BY T1.name ) T WHERE T.num = 2

Database: legislator
Question: Give the Wikipedia IDs of historical legislators who are Readjuster Democrats.
Evidence: Readjuster Democrats refers to party = 'Readjuster Democrat'
SQL: SELECT T2.wikipedia_id FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'Readjuster Democrat'

Database: car_retails
Question: List out 3 best seller products during year 2003 with their total quantity sold during 2003.
Evidence: Best selling products refer to products with MAX(quantityOrdered); 2003 refers to year(orderDate) = 2003;
SQL: SELECT t3.productName, SUM(t2.quantityOrdered) FROM orders AS t1 INNER JOIN orderdetails AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN products AS t3 ON t2.productCode = t3.productCode WHERE STRFTIME('%Y', t1.orderDate) = '2003' GROUP BY t3.productName ORDER BY SUM(t2.quantityOrdered) DESC LIMIT 3

Database: world
Question: List the names of the country that officially uses English as their language.
Evidence: officially uses English as their language refers to `Language` = 'English' AND IsOfficial = 'T';
SQL: SELECT T2.Name FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.IsOfficial = 'T' AND T1.Language = 'English'

Database: disney
Question: Among the movies directed by Wolfgang Reitherman, how many of them are Comedies?
Evidence: directed by Wolfgang Reitherman refers to director = 'Wolfgang Reitherman'; comedies refers to genre = 'Comedy'; movies refer to movie_title;
SQL: SELECT COUNT(T3.name) FROM ( SELECT T2.name FROM `movies_total_gross` AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Wolfgang Reitherman' AND T1.genre = 'Comedy' GROUP BY T2.name ) T3

Database: world_development_indicators
Question: Which high income group countries are from Asia?
Evidence: Asia is the name of the region;
SQL: SELECT CountryCode, Region FROM Country WHERE (IncomeGroup = 'High income: OECD' OR IncomeGroup = 'High income: nonOECD') AND Region LIKE '%Asia%'

Database: superstore
Question: How many orders were made by Corey Roper in 2015?
SQL: SELECT COUNT(T2.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Corey Roper' AND STRFTIME('%Y', T2.`Ship Date`) = '2015'

Database: codebase_comments
Question: What is solution 1's processing time and how many methods have been using this solution?
Evidence: solution refers to Solution.Id and SolutionId; Solution.Id = 1; SolutionId = 1; processing time refers to ProcessedTime; methods refers to Name;
SQL: SELECT T1.ProcessedTime, COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.SolutionId = 1

Database: food_inspection_2
Question: What is the full name of the employee that inspected establishments with license 1334073?
Evidence: full name refers to first_name, last_name; with license 1334073 refers to license_no = 1334073
SQL: SELECT DISTINCT T1.first_name, T1.last_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.license_no = 1334073

Database: legislator
Question: Who is the Pro-Administration senator that runs from March 4, 1789 to December 31, 1791?
Evidence: Pro-Administration refers to party = 'Pro-Administration'; senator refers to type = 'sen'; runs from March 4, 1789 refers to start = '1789-03-04'; runs to refers to end = '1791-12-31';
SQL: SELECT T1.first_name, T1.last_name FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Pro-Administration' AND T2.start = '1789-03-04' AND T2.end = '1791-12-31'

Database: simpson_episodes
Question: How much more votes for episode 1 than for episode 5?
Evidence: more votes refers to SUBTRACT(SUM(votes when episode = 1), SUM(votes when episode = 5))
SQL: SELECT SUM(CASE WHEN T1.episode = 1 THEN T2.votes ELSE 0 END) - SUM(CASE WHEN T1.episode = 5 THEN T2.votes ELSE 0 END) AS diff FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id;

Database: donor
Question: When was the highest amount of donated? How much was the amount?
Evidence: when refers donation_timestamp; the highest amount refers to max(donation_total)
SQL: SELECT donation_timestamp, donation_total FROM donations WHERE donation_total = ( SELECT donation_total FROM donations ORDER BY donation_total DESC LIMIT 1 )

Database: superstore
Question: What is the name of the product that has the highest original price?
Evidence: has the highest original price refers to MAX(DIVIDE(Sales, SUTRACT(1, discount))); name of the product refers to "Product Name"
SQL: SELECT T2.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` ORDER BY (T1.Sales / (1 - T1.Discount)) DESC LIMIT 1

Database: movielens
Question: What is the total amount male and female actors who were casted in movie ID 1684910 and what is the proportion between the highest quality actors against the worst quality of actors? Indicate your answer in percentage. List the the director as well as the genre.
Evidence: Female actors mean that a_gender = 'F'; Male actors mean that a_gender = 'M'; a_quality = 5 refers to act the best, a_quality = 0 refers to act the worst
SQL: SELECT SUM(IIF(a_gender = 'M', 1, 0)) , SUM(IIF(a_gender = 'F', 1, 0)) , CAST(SUM(IIF(a_quality = 5, 1, 0)) AS REAL) * 100 / COUNT(*) , CAST(SUM(IIF(a_quality = 0, 1, 0)) AS REAL) * 100 / COUNT(*), ( SELECT directorid FROM movies2directors WHERE movieid = 1684910 ) , ( SELECT genre FROM movies2directors WHERE movieid = 1684910 ) FROM actors WHERE actorid IN ( SELECT actorid FROM movies2actors WHERE movieid = 1684910 )

Database: synthea
Question: Indicate the start date of patient Walter Bahringer's care plan.
Evidence: start date of the care plan refers to careplans.START;
SQL: SELECT DISTINCT T2.start FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Walter' AND T1.last = 'Bahringer'

Database: public_review_platform
Question: How many business have been reviewed by user ID 3 and how long have this user been with Yelp?
Evidence: year with yelp = Subtract ('%Y'(CURRENT TIME), user_yelping_since_year)
SQL: SELECT COUNT(T1.business_id) , strftime('%Y', 'now') - T2.user_yelping_since_year FROM Reviews AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.user_id = 3

Database: regional_sales
Question: Find the store ID with more orders between "Aurora" and "Babylon" city.
Evidence: "Aurora" refers to City Name = 'Aurora (Township)'; "Babylon" refers to City Name = 'Babylong (Town)'; more order refers to Max(Count(OrderNumber))
SQL: SELECT T2.StoreID FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.`City Name` = 'Aurora (Township)' OR T2.`City Name` = 'Babylon (Town)' GROUP BY T2.StoreID ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1

Database: professional_basketball
Question: For the players who belongs to the east conference, please list the name of the college they went to.
Evidence: belong to the east conference refers to divID = 'EA'
SQL: SELECT DISTINCT T1.college FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T2.conference = 'East'