Database: sales_in_weather
Question: What is the difference between the units sold for item 1 when the sunset was the earliest and the latest?
Evidence: item 1 refers to item_nbr = 1; when the sunset earliest refers to Min(sunset); latest sunset refers to Max(sunset); difference unit sold refers to Subtract(Sum(units where Min(sunset)), Sum(units where Max(sunset)))
SQL: SELECT ( SELECT SUM(T2.units) AS sumunit FROM weather AS T1 INNER JOIN sales_in_weather AS T2 ON T1.`date` = T2.`date` INNER JOIN relation AS T3 ON T2.store_nbr = T3.store_nbr WHERE T2.item_nbr = 5 AND sunset IS NOT NULL GROUP BY T1.sunset ORDER BY T1.sunset LIMIT 1 ) - ( SELECT SUM(T2.units) AS sumunit FROM weather AS T1 INNER JOIN sales_in_weather AS T2 ON T1.`date` = T2.`date` INNER JOIN relation AS T3 ON T2.store_nbr = T3.store_nbr WHERE T2.item_nbr = 5 AND sunset IS NOT NULL GROUP BY T1.sunset ORDER BY T1.sunset DESC LIMIT 1 )

Database: movie_3
Question: Where is store number 2 located?
Evidence: store number 2 refers to store_id = 2; where is a store located refers to address, address2, district
SQL: SELECT T1.address, T1.address2, T1.district FROM address AS T1 INNER JOIN store AS T2 ON T1.address_id = T2.address_id WHERE T2.store_id = 2

Database: regional_sales
Question: State the full name of state code "GA".
SQL: SELECT T FROM ( SELECT IIF(StateCode = 'GA', State, NULL) AS T FROM Regions ) WHERE T IS NOT NULL

Database: music_platform_2
Question: How many ratings of 5 have been given to the podcast "Please Excuse My Dead Aunt Sally"?
Evidence: rating of 5 refers to rating = 5; 'Please Excuse My Dead Aunt Sally' is the title of podcast
SQL: SELECT COUNT(T2.rating) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Please Excuse My Dead Aunt Sally' AND T2.rating = 5

Database: movielens
Question: Please list the genre of the movies that are the newest and is in English.
Evidence: Year contains relative value, higher year value refers to newer date; Year = 4 refers to newest date, Year = 1 refer to oldest date; In English means isEnglish = T
SQL: SELECT T2.genre FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.year = 4 AND T1.isEnglish = 'T'

Database: cars
Question: What is the price of Chevrolet Vega 2300?
Evidence: Chevrolet Vega 2300 refers to car_name = 'chevrolet vega 2300'
SQL: SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'chevrolet vega 2300'

Database: retail_world
Question: What was the average unit price of products shipped via United Package in 1997?
Evidence: via United Package refers to CompanyName = 'United Package'; in 1997 refers to OrderDate > = '1997-01-01 00:00:00' AND OrderDate < '1998-01-01 00:00:00'; average unit price = divide(sum(UnitPrice), count(ShipperID))
SQL: SELECT AVG(T2.UnitPrice) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Shippers AS T3 ON T1.ShipVia = T3.ShipperID WHERE T1.OrderDate LIKE '1997%' AND T3.CompanyName = 'United Package'

Database: shakespeare
Question: How many characters are there in Twelfth Night?
Evidence: Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT COUNT(DISTINCT T4.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T1.Title = 'Twelfth Night'

Database: european_football_1
Question: What is the name of the division that has had the lowest number of draft matches in the 2019 season?
Evidence: the lowest number of draft matches refers to MIN(COUNT(FTR = 'D'));
SQL: SELECT T2.name FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.season = 2019 AND T1.FTR = 'D' GROUP BY T2.division ORDER BY COUNT(FTR) LIMIT 1

Database: superstore
Question: List down the sales, profit, and subcategories of the product ordered in the order ID US-2011-126571 in the East region.
SQL: SELECT T1.Sales, T1.Profit, T2.`Sub-Category` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Order ID` = 'US-2011-126571' AND T2.Region = 'East'

Database: talkingdata
Question: Provide the phone brands and models of the users who were at the coordinates of (80,44).
Evidence: models refers to device_model; coordinates of (80,44) refers to longitude = 80 AND latitude = 44;
SQL: SELECT DISTINCT T1.phone_brand, T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN events AS T2 ON T2.device_id = T1.device_id WHERE T2.longitude = 80 AND T2.latitude = 44

Database: regional_sales
Question: List the order numbers and product names which were ordered on 6th June, 2018.
Evidence: ordered on 6th June 2018 refers to OrderDate = '6/5/18'
SQL: SELECT DISTINCT OrderNumber, `Product Name` FROM ( SELECT IIF(T2.OrderDate = '6/6/18', T2.OrderNumber, NULL) AS "OrderNumber" , IIF(T2.OrderDate = '6/6/18', T1.`Product Name`, NULL) AS "Product Name" FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2._ProductID = T1.ProductID ) WHERE OrderNumber IS NOT NULL AND `Product Name` IS NOT NULL

Database: human_resources
Question: Who is the employee in “New York City” with a good performance? Give the social security number of the employee.
Evidence: New York City refers to locationcity = 'New York City'; good performance refers to performance = 'Good'; social security number refers to ssn
SQL: SELECT T1.firstname, T1.lastname, T1.ssn FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.locationcity = 'New York City' AND T1.performance = 'Good'

Database: movies_4
Question: In how many movie does Dariusz Wolski work as the director of photography?
Evidence: director of photography refers to job = 'Director of Photography'
SQL: SELECT COUNT(T2.movie_id) FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Dariusz Wolski' AND T2.job = 'Director of Photography'

Database: soccer_2016
Question: In how many venues did team 2 win the toss and lose the match?
Evidence: team 2 win the toss refers to Toss_Winner = Team_2 ; lose the match refers to Match_Winner = Team_1
SQL: SELECT SUM(CASE WHEN T1.Team_2 = T1.Match_Winner THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id WHERE T1.Team_1 = T1.Toss_Winner

Database: food_inspection
Question: List the names and business certificates of the eateries which got inspection score under 50.
Evidence: eateries which got inspection score under 50 refer to business_id where score < 50;
SQL: SELECT T2.name, T2.business_id FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score < 50

Database: public_review_platform
Question: How many short tips were left for the business with ID no.2?
Evidence: short tip refers to tip_length = 'Short'; business category refers to category_name
SQL: SELECT COUNT(business_id) FROM Tips WHERE business_id = 2 AND tip_length = 'Short'

Database: world_development_indicators
Question: From 1961 to 1980, what was the highest percentage of land used for agriculture in the Republic of Benin?
Evidence: from 1961 to 1980 refers to year between '1961' and '1980'; the highest percentage of land used for agriculture refers to max(value where IndicatorName = 'Agricultural land (% of land area)'); in the Republic of Benin refers to longname = 'Republic of Benin'
SQL: SELECT MAX(T1.Value) FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Year >= 1961 AND T1.Year < 1981 AND T1.IndicatorName LIKE 'Agricultural land (% of land area)' AND T2.LongName = 'Republic of Benin'