Database: beer_factory
Question: List the brand names of bottled root beer whose first brewing year is no later than 1930.
Evidence: bottled root beer refers to ContainerType = 'Bottle'; first brewing year is no later than 1930 refers to FirstBrewedYear < 1930;
SQL: SELECT T2.BrandName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T2.FirstBrewedYear < '1930-01-01' AND T1.ContainerType = 'Bottle' ORDER BY T2.FirstBrewedYear LIMIT 1

Database: restaurant
Question: What is the county and region of Plearn-Thai Cuisine restaurant?
Evidence: Plearn-Thai Cuisine restaurant refers to label = 'plearn-thai cuisine'
SQL: SELECT T1.county, T1.region, T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.label = 'plearn-thai cuisine'

Database: beer_factory
Question: List out the name of the top 10 spenders and what credit card type are they using.
Evidence: top 10 spenders refers to MAX(PurchasePrice) LIMIT 10;
SQL: SELECT T1.First, T1.Last, T2.CreditCardType FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T1.CustomerID ORDER BY SUM(T2.PurchasePrice) DESC LIMIT 10

Database: synthea
Question: List all the full names of patients with a condition described as cystitis.
Evidence: full names = first, last; condition described as cystitis refers to conditions.DESCRIPTION = ''Cystitis';
SQL: SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.patient WHERE T2.DESCRIPTION = 'Cystitis'

Database: coinmarketcap
Question: List all the inactive coins and state the last date of its transaction?
Evidence: the last date refers to max(date); inactive coins refers to status = 'inactive'
SQL: SELECT T1.NAME, MAX(T2.DATE) FROM coins AS T1 INNER JOIN historical AS T2 ON T1.ID = T2.coin_id WHERE T1.status = 'inactive' ORDER BY T2.DATE DESC LIMIT 1

Database: legislator
Question: Among the current legislators who served the term starting on 2013/1/3, how many of them are female?
Evidence: term starting on 2013/1/3 refers to start = '2013-01-03; female refers to gender_bio = 'F';
SQL: SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.start = '2013-01-03' AND T1.gender_bio = 'F'

Database: superstore
Question: How many orders of O'Sullivan Plantations 2-Door Library in Landvery Oak in central superstore were shipped through the shipping mode with the fastest delivery speed?
Evidence: 'O'Sullivan Cherrywood Estates Traditional Bookcase' is the "Product Name"; shipping mode with the fastest delivery speed refers to "Ship Mode" = 'First Class'
SQL: SELECT COUNT(DISTINCT T1.`Order ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'O''Sullivan Plantations 2-Door Library in Landvery Oak' AND T2.Region = 'Central' AND T1.`Ship Mode` = 'First Class'

Database: student_loan
Question: Please list the male students that are disabled and have filed for bankruptcy.
Evidence: male students that are disabled and have filed for bankruptcy refers to name that appeared in all three male, disabled and filed_for_bankrupcy tables.
SQL: SELECT T1.name, T2.name, T3.name FROM disabled AS T1 INNER JOIN male AS T2 ON T1.`name` = T2.`name` INNER JOIN filed_for_bankrupcy AS T3 ON T1.`name` = T3.`name`

Database: shakespeare
Question: Calculate average scene per act in Antony and Cleopatra.
Evidence: Antony and Cleopatra refers to Title = 'Antony and Cleopatra'; average scene per act = divide(sum(Scene), count(act))

SQL: SELECT CAST(SUM(T2.Scene) AS REAL) / COUNT(T2.act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Antony and Cleopatra'

Database: cookbook
Question: What are the names of the recipes that will cause stomach pain?
Evidence: cause stomach pain refers to iron > 20
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20

Database: synthea
Question: When the allergy starts for Angelo Buckridge.
SQL: SELECT T2.START FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Adolfo' AND T1.last = 'Schmitt' AND T2.STOP IS NOT NULL

Database: airline
Question: What is the number of air carriers in the database?
SQL: SELECT COUNT(Code) FROM `Air Carriers`

Database: soccer_2016
Question: How many players have left arm fast in bowling skill?
Evidence: have left arm fast in bowling skill refers to Bowling_skill = 'Left-arm fast';
SQL: SELECT COUNT(T1.Player_Id) FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id WHERE T2.Bowling_skill = 'Left-arm fast'

Database: food_inspection
Question: Give the address of the business with the most number of the low risk violations.
Evidence: the most number of the low risk violations refers to MAX(COUNT(business_id)) where risk_category = 'Low Risk' ;
SQL: SELECT T2.address FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'Low Risk' GROUP BY T2.address ORDER BY COUNT(T1.business_id) DESC LIMIT 1

Database: bike_share_1
Question: On 8/29/2013 at 6:14:01 PM, how many bikes were borrowed from San Jose Diridon Caltrain Station?
Evidence: How many bikes borrowed can be computed as SUBTRACT(SUM(dock_count), bikes_available where name = 'San Jose Diridon Caltrain Station' and time = '2013/08/29 06:14:01');
SQL: SELECT SUM(T1.dock_count - T2.bikes_available) FROM station AS T1 INNER JOIN status AS T2 ON T1.id = T2.station_id WHERE T1.name = 'San Jose Diridon Caltrain Station' AND T2.time = '2013/08/29 06:14:01'

Database: app_store
Question: How many of the users hold neutral attitude on "10 Best Foods for You" app and what category is this app?
Evidence: neutral attitude refers to Sentiment = 'Neutral';
SQL: SELECT COUNT(T2.App), T1.Category FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = '10 Best Foods for You' AND T2.Sentiment = 'Neutral'

Database: movie_3
Question: How many films have a rental duration of over 6 days?
Evidence: rental duration of over 6 days refers to rental_duration > 6
SQL: SELECT COUNT(film_id) FROM film WHERE rental_duration > 6

Database: talkingdata
Question: How many users from the group "F29-32" who were active in the events on 2016/5/7?
Evidence: active users refers to is_active = '1'; on 2016/5/7 refers to timestamp = '2016/5/7 XX:XX:XX';
SQL: SELECT COUNT(T1.app_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id INNER JOIN gender_age AS T3 ON T2.event_id = T3.device_id WHERE SUBSTR(T2.`timestamp`, 1, 10) = '2016-05-07' AND T1.is_active = '1' AND T3.`group` = 'F29-32'

Database: superstore
Question: How many orders with a quantity greater than 5 have been shipped by the fastest delivery method?
Evidence: orders with a quantity greater than 5 refers to Quantity > 5; shipped by the fastest delivery method refers to Ship Mode = 'First Class'
SQL: SELECT COUNT(DISTINCT `Order ID`) FROM central_superstore WHERE Quantity > 5 AND `Ship Mode` = 'First Class'

Database: legislator
Question: How many current legislators do not have an account on ballotpedia.org ?
Evidence: do not have an account on ballotpedia.org refers to ballotpedia_id IS NULL OR ballotpedia_id = ''
SQL: SELECT COUNT(*) FROM current WHERE ballotpedia_id = '' OR ballotpedia_id IS NULL

Database: olympics
Question: Who is the heaviest athlete?
Evidence: Who refers to full_name; the heaviest refers to MAX(weight);
SQL: SELECT full_name FROM person ORDER BY weight DESC LIMIT 1