Database: beer_factory
Question: Give me the brewery and brand names of canned root beer that were purchased before 6/6/2015.
Evidence: canned root beer refers to ContainerType = 'Can'; purchased before 6/6/2015 refers to PurchaseDate < '2015-06-06';
SQL: SELECT DISTINCT T2.BreweryName, T2.BrandName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T1.PurchaseDate < '2015-06-06' AND T1.ContainerType = 'Can'

Database: chicago_crime
Question: How many community areas are there in Central Chicago?
Evidence: Central Chicago refers to side = 'Central'
SQL: SELECT COUNT(*) FROM Community_Area WHERE side = 'Central'

Database: chicago_crime
Question: Please name three communities that experience the fraud incident.
Evidence: communities refers to community_area_name; 'Fraud Incident' is the title of crime
SQL: SELECT T3.community_area_name FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T1.title = 'Criminal Sexual Assault' LIMIT 3

Database: movies_4
Question: What is the role of Mark Hammel?
Evidence: role refers to job
SQL: SELECT T2.job FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Mark Hammel'

Database: retail_complains
Question: What percentage of complaints are from the elderly?
Evidence: elder refers to age < = 65; percentage refers to divide(sum(age < = 65) , count(client_id)) * 100%
SQL: SELECT CAST(SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID

Database: books
Question: What is the full name of the customer who owns the "aalleburtonkc@yellowbook.com" e-mail address?
Evidence: "aalleburtonkc@yellowbook.com" is the email of customer; full name refers to first_name, last_name
SQL: SELECT first_name, last_name FROM customer WHERE email = 'aalleburtonkc@yellowbook.com'

Database: beer_factory
Question: What is the average number of reviews of all the root beer brands from "CA" State?
Evidence: average = DIVIDE(COUNT(CustomerID), COUNT(BrandID) WHERE state = CA); 

SQL: SELECT CAST(COUNT(*) AS REAL) / COUNT(DISTINCT T1.BrandID) AS avgreview FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T1.State = 'CA'

Database: human_resources
Question: Among the employees working at the office in New York, how many of them have a good job performance?
Evidence: Sandy Adams is the fullname of an employee; full name = firstname, lastname; New York refers to state = 'NY'; good job performance refers to performance = 'Good';
SQL: SELECT COUNT(*) FROM employee AS T1 INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.state = 'NY' AND T1.performance = 'Good'

Database: app_store
Question: What is the number of installments of the app with the highest total Sentiment polarity score?
Evidence: installments refers to Installs; highest total sentiment polarity score = MAX(SUM(Sentiment_Polarity));
SQL: SELECT T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App GROUP BY T1.App ORDER BY SUM(T2.Sentiment_Polarity) DESC LIMIT 1

Database: movie_3
Question: For how many times has the customer RUTH MARTINEZ rented a film?
Evidence: times of rented refers to Count(rental_id)
SQL: SELECT COUNT(T2.rental_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ'

Database: movie
Question: Among the movies with drama genre, what is the percentage of the actors with net worth greater than $400,000,000.00?
Evidence: drama genre refers to Genre = 'Drama'; net worth greater than $400,000,000.00 refers to NetWorth > '$400,000,000.00'; percentage = divide(count(ActorID where NetWorth > '$400,000,000.00'), COUNT(ActorID))*100%
SQL: SELECT SUM(CASE WHEN CAST(REPLACE(REPLACE(T3.NetWorth, ',', ''), '$', '') AS REAL) > 400000000 THEN 1 ELSE 0 END) - SUM(CASE WHEN CAST(REPLACE(REPLACE(T3.NetWorth, ',', ''), '$', '') AS REAL) < 400000000 THEN 1 ELSE 0 END) FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Genre = 'Drama'

Database: chicago_crime
Question: How many domestic crime cases has Commander Ronald A. Pontecore Jr. been responsible for investigating?
Evidence: domestic crime refers to domestic = 'TRUE'; person responsible for investigating refers to commander
SQL: SELECT SUM(CASE WHEN T2.domestic = 'TRUE' THEN 1 ELSE 0 END) FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no WHERE T1.commander = 'Ronald A. Pontecore Jr.'

Database: book_publishing_company
Question: Name all the authors for all business titles.
Evidence: business title refers to title under business where type = 'business'
SQL: SELECT T3.au_fname, T3.au_lname FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T1.type = 'business'

Database: video_games
Question: Find out the platform of the game "Final Fantasy XIII-2".
Evidence: platform of the game refers to platform_name; "Final Fantasy XIII-2" refers to game_name = 'Final Fantasy XIII-2';
SQL: SELECT T4.platform_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T1.game_name = 'Final Fantasy XIII-2'

Database: shakespeare
Question: How many characters are there in Titus Andronicus?
Evidence: Titus Andronicus refers to Title = 'Titus Andronicus'
SQL: SELECT COUNT(DISTINCT T3.character_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 WHERE T1.Title = 'Titus Andronicus'

Database: professional_basketball
Question: From 1950 to 1970, how many coaches who received more than 1 award?
Evidence: from 1950 to 1970 refers to year between 1950 and 1970; more than 3 awards refers to count(award) > 3
SQL: SELECT COUNT(coachID) FROM awards_coaches WHERE year BETWEEN 1950 AND 1970 GROUP BY coachID HAVING COUNT(coachID) > 1

Database: movie_3
Question: What is the average replacement cost for the movies with a rental rate of 4.99?
Evidence: a rental rate of 4.99 refers to rental_rate = 4.99; average replacement cost = avg(replacement_cost)
SQL: SELECT AVG(replacement_cost) FROM film WHERE rental_rate = 4.99

Database: soccer_2016
Question: Write down the player names and IDs of the English umpires.
Evidence: English umpires refers to Country_Name = 'England'
SQL: SELECT T1.Umpire_Name, T1.Umpire_Id FROM Umpire AS T1 INNER JOIN Country AS T2 ON T1.Umpire_Country = T2.Country_Id WHERE T2.Country_Name = 'England'

Database: music_platform_2
Question: List all podcast with its itunes url for all title containing the word 'Dream'.
Evidence: containing the word 'Dream' refers to title LIKE '%Dream%'
SQL: SELECT itunes_url FROM podcasts WHERE title LIKE '%Dream%' GROUP BY itunes_url

Database: chicago_crime
Question: How many simple assaults happened on 2018/9/8?
Evidence: simple assault refers to primary_description = 'ASSAULT'AND secondary_description = 'SIMPLE'; on 2018/9/8 refers to date like '%9/8/2018%'
SQL: SELECT SUM(CASE WHEN T2.secondary_description = 'SIMPLE' THEN 1 ELSE 0 END) FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T1.iucr_no = T2.iucr_no WHERE T1.date LIKE '%9/8/2018%' AND T2.primary_description = 'ASSAULT'