Database: soccer_2016
Question: What is the name of the team that won the first ever match?
Evidence: name of the team refers to Team_Name; won the first ever match refers to Match_Winner where max(Match_Date)
SQL: SELECT T1.Team_Name FROM team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner WHERE T2.Season_Id = 1 ORDER BY T2.Match_Date LIMIT 1

Database: app_store
Question: What is the average price of games belonging in the arcade genre which has a content rating of Everyone 10+?
Evidence: average price = AVG(Price);
SQL: SELECT AVG(Price) FROM playstore WHERE 'Content Rating' = 'Everyone 10+' AND Genres = 'Arcade'

Database: regional_sales
Question: What is the average median income for all City type of stores?
Evidence: AVG(Median Income) where Type = 'City';
SQL: SELECT AVG(`Median Income`) FROM `Store Locations` WHERE Type = 'City'

Database: books
Question: Indicate the full name of all customers whose last name begins with the letter K.
Evidence: full name refers to first_name, last_name; last name begin with the letter 'K' refers to last_name LIKE 'K%'
SQL: SELECT first_name, last_name FROM customer WHERE last_name LIKE 'K%'

Database: movie_3
Question: What is the title of the film with the longest duration time and stars PENELOPE GUINESS?
Evidence: longest duration of film refers to Max(length)
SQL: SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'PENELOPE' AND T1.last_name = 'GUINESS' ORDER BY T3.length DESC LIMIT 1

Database: bike_share_1
Question: Please calculate the average duration of trips started at South Van Ness at Market in 2015.
Evidence: started at refers to start_station_name; start_station_name = 'South Van Ness at Market'; average duration = DIVIDE(SUM(duration), COUNT(duration));
SQL: SELECT AVG(duration) FROM trip WHERE start_date LIKE '%2015%' AND start_station_name = 'South Van Ness at Market'

Database: sales_in_weather
Question: How many days did the show fell more than 5 inches?
Evidence: snow fell more than 5 inches refers to snowfall > 5
SQL: SELECT COUNT(DISTINCT `date`) FROM weather WHERE snowfall > 5

Database: soccer_2016
Question: Provide the losing team's name in the match ID 336039.
Evidence: losing team's name refers to Team_Id NOT in "match_winner" column
SQL: SELECT Team_Name FROM Team WHERE Team_Id = ( SELECT CASE WHEN Team_1 = Match_Winner THEN Team_2 ELSE Team_1 END FROM Match WHERE match_id = 336039 )

Database: movie_3
Question: What are the full names of all the active employees?
Evidence: active employee refers to active = 1; full name refers to first_name, last_name
SQL: SELECT first_name, last_name FROM staff WHERE active = 1

Database: law_episode
Question: What are the titles of the top 3 episodes that received no less than 30 votes in its 10-star rating?
Evidence: no less than 30 votes refers to votes > = 30; 10-star rating refers to stars = 10
SQL: SELECT T2.title FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id WHERE T1.votes >= 30 AND T1.stars = 10 ORDER BY T1.votes DESC LIMIT 3

Database: address
Question: How many post offices are there in New York?
Evidence: "New York" refers to state = 'NY' and name = 'New York'; 'Post Office' is the type
SQL: SELECT COUNT(DISTINCT T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.abbreviation = 'NY' AND T2.type = 'Post Office'

Database: soccer_2016
Question: How many cities are in U.A.E?
Evidence: U.A.E refers to Country_Name = 'U.A.E'
SQL: SELECT SUM(CASE WHEN T2.Country_Name = 'U.A.E' THEN 1 ELSE 0 END) FROM City AS T1 INNER JOIN country AS T2 ON T1.Country_id = T2.Country_id

Database: ice_hockey_draft
Question: Mention the type of game that Matthias Trattnig played.
Evidence: type of game refers to GAMETYPE;
SQL: SELECT DISTINCT T1.GAMETYPE FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Matthias Trattnig'

Database: software_company
Question: What percentage of elderly customers who are never married in the place with geographic ID 24?
Evidence: elderly customers refer to age > 65; DIVIDE(COUNT(ID where age > 65, MARITAL_STATUS = 'never married' and GEOID = 24), COUNT(ID where GEOID = 24)) as percentage;
SQL: SELECT CAST(SUM(CASE WHEN T1.MARITAL_STATUS = 'never married' THEN 1.0 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.GEOID = 24

Database: beer_factory
Question: Among the root beer brands that do not advertise on Twitter, how many of them have root beers sold in August, 2014?
Evidence: do not advertise on Twitter refers to twitter IS NULL; in August, 2014 refers to SUBSTR(TransactionDate, 1, 4) = '2014' AND SUBSTR(TransactionDate, 6, 2) = '08';
SQL: SELECT COUNT(T1.BrandID) FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID WHERE T2.TransactionDate LIKE '2014-08%' AND T3.Twitter IS NULL

Database: app_store
Question: How many apps that are only compatible with Android ver 8.0 and above? List down the users' sentiment of these apps.
Evidence: compatible with android refers to Android Ver; Android Ver" = '8.0 and up';
SQL: SELECT DISTINCT Sentiment FROM user_reviews WHERE App IN ( SELECT App FROM playstore WHERE `Android Ver` = '8.0 and up' )

Database: book_publishing_company
Question: Among all the employees, how many percent more for the publishers than designers?
Evidence: publisher and designer are job descriptions which refers to job_desc; percentage more = 100*(SUBTRACT(SUM(CASE WHERE job_desc = 'publisher), SUM(CASE WHERE job_desc = 'designer'))
SQL: SELECT CAST(SUM(CASE WHEN T2.job_desc = 'publisher' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.job_desc = 'designer' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.job_id) FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id

Database: professional_basketball
Question: Among the NBA All-star players in 1996 season , which have more than 70% free throw rate? Please give their player id.
Evidence: NBA refers to lgID = 'NBA'; in 1996 season refers to season_id = 1996; more than 70% free throw rate refers to ft_made > = 0 AND ft_attempted > 0 AND divide(ft_made, ft_attempted) > 0.7
SQL: SELECT playerID FROM player_allstar WHERE season_id = 1996 AND CAST(ft_made AS REAL) * 100 / ft_attempted > 70

Database: retail_complains
Question: How many customers in the Northeast use Microsoft email?
Evidence: the Northeast refers to Region = 'Northeast'; Microsoft email refers to email like '%@outlook.com'
SQL: SELECT COUNT(T1.email) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T3.Region = 'Northeast' AND T1.email LIKE '%@outlook.com'

Database: public_review_platform
Question: What is the attribute value of an inactive business with a medium review count and 3.5 stars which is located at Phoenix, AZ?
Evidence: inactive business refers to active = 'FALSE'; 'AZ' is the state; 'Phoenix' is the name of city; medium review count refers to review_count = 'Medium'; 3.5 stars refers to stars = 3.5
SQL: SELECT T2.attribute_value FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T1.state LIKE 'AZ' AND T1.review_count LIKE 'Medium' AND T1.active LIKE 'FALSE' AND T1.city LIKE 'Phoenix' AND T1.stars = 3.5

Database: food_inspection
Question: How many eateries are located in Hayward?
Evidence: eateries in Hayward refer city = 'HAYWARD';
SQL: SELECT COUNT(business_id) FROM businesses WHERE city = 'HAYWARD'