Database: social_media
Question: What is the percentage of male Twitter users from Florida?
Evidence: "Florida" is the State; male user refers to Gender = 'Male'; percentage = Divide (Count(UserID where Gender = 'Male'), Count (UserID)) * 100
SQL: SELECT SUM(CASE WHEN T3.Gender = 'Male' THEN 1.0 ELSE 0 END) / COUNT(T1.TweetID) AS percentage FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T3 ON T3.UserID = T1.UserID WHERE T2.State = 'Florida'

Database: retail_world
Question: State the name of all territories in Northern region.
Evidence: name of all territories refers to TerritoryDescription; Northern region refers to RegionDescription = 'Northern'
SQL: SELECT DISTINCT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Northern'

Database: university
Question: What is the location and number of female students in university ID 23 in 2011?
Evidence: in 2011 refers to year 2011; female students refers to DIVIDE(MULTIPLY(num_students, pct_female_students), 100); location refers to country_name
SQL: SELECT T3.country_name, CAST(T2.num_students * T2.pct_female_students AS REAL) / 100 FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T2.year = 2011 AND T1.id = 23

Database: donor
Question: Which school county in the state of New York has a high number of low poverty levels?
Evidence: New York refer to school_state = NY; highest number of low poverty level refer to MAX(poverty level = ’low poverty’)
SQL: SELECT school_county FROM projects WHERE poverty_level = 'low poverty' AND school_state = 'NY' GROUP BY school_state ORDER BY COUNT(poverty_level) DESC LIMIT 1

Database: menu
Question: Tally the dishes that have appeared on the menu for more than 100 years.
Evidence: appeared on the menu for more than 100 years = SUBTRACT(last_appeared, first_appeared) > 100;
SQL: SELECT T1.name FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.last_appeared - T1.first_appeared > 100

Database: coinmarketcap
Question: What is the average monthly circulating supply for Frozen in 2014.
Evidence: average monthly circulating supply = AVG(circulating_supply); in 2017 refers to date BETWEEN '2017-01-01' AND '2017-12-31'
SQL: SELECT CAST(SUM(T2.circulating_supply) AS REAL) / 12 FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'Frozen' AND STRFTIME('%Y', T2.date) = '2014'

Database: airline
Question: How many flights operated by American Airlines Inc. on 2018/8/1 were faster than scheduled?
Evidence: American Airlines Inc. refers to Description = 'American Airlines Inc.: AA'; on 2018/8/1 refers to FL_DATE = '2018/8/1'; faster than scheduled refers to ACTUAL_ELAPSED_TIME < CRS_ELAPSED_TIME;
SQL: SELECT SUM(CASE WHEN T2.ACTUAL_ELAPSED_TIME < CRS_ELAPSED_TIME THEN 1 ELSE 0 END) AS count FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T2.FL_DATE = '2018/8/1' AND T3.Description = 'American Airlines Inc.: AA'

Database: food_inspection_2
Question: What is the inspection ID where the employee named "David Hodges" is currently employed in the "Kamayan Express" establishment?
Evidence: the "Kamayan Express" establishment refers to dba_name = 'KAMAYAN EXPRESS'
SQL: SELECT T2.inspection_id FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN employee AS T3 ON T2.employee_id = T3.employee_id WHERE T3.first_name = 'David' AND T3.last_name = 'Hodges' AND T1.dba_name = 'KAMAYAN EXPRESS'

Database: professional_basketball
Question: From 1962 to 1975, how many coaches received the award?
Evidence: from 1960 to 1975 refers to year between 1960 and 1975
SQL: SELECT COUNT(DISTINCT coachID) FROM awards_coaches WHERE year BETWEEN 1962 AND 1975

Database: public_review_platform
Question: How many Yelp businesses are opened 24 hours?
Evidence: open 24 hours refers to attribute_name = 'Open 24 Hours' AND attribute_value = 'true';
SQL: SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T1.attribute_name LIKE 'Open 24 Hours' AND T2.attribute_value LIKE 'TRUE'

Database: movie_3
Question: What is the average rental payment in Horror movies?
Evidence: 'Horror' is a name of a category; average rental payment refers to AVG(amount)
SQL: SELECT AVG(T5.amount) FROM category AS T1 INNER JOIN film_category AS T2 ON T1.category_id = T2.category_id INNER JOIN inventory AS T3 ON T2.film_id = T3.film_id INNER JOIN rental AS T4 ON T3.inventory_id = T4.inventory_id INNER JOIN payment AS T5 ON T4.rental_id = T5.rental_id WHERE T1.name = 'Horror'

Database: olympics
Question: Which city were the Olympic games held in 1992?
Evidence: city refers to city_name; in 1992 refers to games_year = 1992;
SQL: SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_year = 1992

Database: retail_world
Question: What is the average quantity of Ikura ordered in one order?
Evidence: average = AVG(Quantity); Ikura refers to ProductName = 'Ikura';
SQL: SELECT CAST(SUM(T2.Quantity) AS REAL) / COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Ikura'

Database: simpson_episodes
Question: Among episodes from 10 to 20, which episode has more than 200 votes?
Evidence: episodes from 10 to 20 refers to episode BETWEEN 10 and 20; more than 200 votes refers to COUNT(votes) > 200
SQL: SELECT DISTINCT T1.episode FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.episode BETWEEN 10 AND 20 AND T2.votes > 200;

Database: soccer_2016
Question: How many players were born in 1970?
Evidence: born in 1970 refers to DOB like '1970%';
SQL: SELECT COUNT(Player_Name) FROM Player WHERE DOB LIKE '1970%'

Database: bike_share_1
Question: Find the average ride duration during the rain of more than 0.8 inches.
Evidence: rain of more than 0.8 inches refers to events = rain where precipitation_inches>0.8; average ride duration = DIVIDE(SUM(duration), COUNT(duration));
SQL: SELECT AVG(T1.duration) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE (T2.events = 'Rain' AND T2.precipitation_inches > 0.8) OR (T2.events = 'rain' AND T2.precipitation_inches > 0.8)

Database: trains
Question: What are the load shapes of all the short ellipse cars?
Evidence: short refers to len = 'short'; ellipse cars refers to shape = 'ellipse'
SQL: SELECT load_shape FROM cars WHERE shape = 'ellipse' AND len = 'short'

Database: movielens
Question: Please list movie IDs which has the oldest publication date and the cast numbers are zero.
Evidence: Year contains relative value, higher year value refers to newer date; Year = 1 refer to oldest date
SQL: SELECT DISTINCT T1.movieid FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.year = 1 AND T2.cast_num = 0

Database: books
Question: How many of the customer addresses are inactive?
Evidence: addresses are inactive refers to address_status = 'Inactive'
SQL: SELECT COUNT(*) FROM customer_address AS T1 INNER JOIN address_status AS T2 ON T1.status_id = T2.status_id WHERE T2.address_status = 'Inactive'

Database: language_corpus
Question: Is word id "88" the word id for title "Animals"?
Evidence: word id "88" refers to wid = 88
SQL: SELECT CASE WHEN COUNT(T1.pid) > 0 THEN 'YES' ELSE 'NO' END AS YORN FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T2.wid = 88 AND T1.title = 'Animals'