Database: synthea
Question: What is the total number of Asian patients who are allergic to peanuts?
Evidence: Asian refers to race like 'asian%'; allergic to peanuts refers to allergies where DESCRIPTION = 'Allergy to peanuts'; 

SQL: SELECT COUNT(T2.patient) FROM allergies AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Allergy to peanuts' AND T2.race = 'asian'

Database: public_review_platform
Question: Calculate the percentage of business which opened on Sunday from 9AM to 9PM based on the number of business opened on Sunday.
Evidence: Sunday refers to day_of_week = 'Sunday' where day_id = 1; opened from 9AM to 9PM refers to Business_Hours where opening_time = '9AM' and closing_time = '9PM'; DIVIDE(COUNT(opening_time = '9AM' and closing_time = '9PM' and day_of_week = 'Sunday'), COUNT(opening_time = NOT NULL and closing_time = NOT NULL and day_of_week = 'Sunday')) as percentage;
SQL: SELECT CAST(SUM(CASE WHEN T2.opening_time = '9AM' AND T2.closing_time = '9PM' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.day_id) FROM Days AS T1 INNER JOIN Business_Hours AS T2 ON T1.day_id = T2.day_id WHERE T1.day_of_week = 'Sunday'

Database: university
Question: Please list the names of all the ranking criteria of Harvard University in 2011.
Evidence: in 2011 refers to year 2011; Harvard University refers to university_name = 'Harvard University'; names of all the ranking criteria refers to criteria_name
SQL: SELECT T1.criteria_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T3.university_name = 'Harvard University' AND T2.year = 2011

Database: movies_4
Question: Among the movie in which Dariusz Wolski works as the director of photography, what is the title of the one with the highest average vote?
Evidence: director of photography refers to job = 'Director of Photography'; highest average vote refers to max(vote_average)
SQL: SELECT T1.title FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T3.person_name = 'Dariusz Wolski' AND T2.job = 'Director of Photography' ORDER BY T1.vote_average DESC LIMIT 1

Database: video_games
Question: What are the games that were released in 2006?
Evidence: game refers to game_name; released in 2006 refers to release_year = 2006
SQL: SELECT T3.game_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.release_year = 2006

Database: retail_world
Question: What is the ratio number of territories in Northern region and number territories in Western region?
Evidence: Northern region refers to RegionID = 3; Western region refers to RegionID = 2 ; ratio = divide((TerritoryDescription where RegionID = 3), (TerritoryDescription where RegionID = 2))
SQL: SELECT CAST(( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Northern' ) AS REAL) * 100 / ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Westerns' ) AS Calu

Database: codebase_comments
Question: Tell the path of the solution for the method "ExportToRTF.RTFStyleSheet.H6Write".
Evidence: path of the solution refers to Path; method refers to Name; Name = 'ExportToRTF.RTFStyleSheet.H6Write';
SQL: SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'ExportToRTF.RTFStyleSheet.H6Write'

Database: public_review_platform
Question: Based on business in Phoenix, calculate the percentage of business with low funny votes.
Evidence: in Chandelier refers to city = 'Chandelier'; percentage = divide(count(business_id where review_votes_funny = 'Low'), count(business_id)); business with low funny votes refers to review_votes_funny = 'Low'
SQL: SELECT CAST(SUM(CASE WHEN T2.review_votes_funny = 'Low' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Phoenix'

Database: movie_platform
Question: What are the URL to the list page on Mubi of the lists with followers between 1-2 and whose last update timestamp was on 2012?
Evidence: URL to the list page on Mubi refers to list_url; list_followers = 1 OR list_followers = 2; last update timestamp was on 2012 refers to list_update_timestamp_utc BETWEEN '2012-1-1' AND '2012-12-31';
SQL: SELECT list_url FROM lists WHERE list_update_timestamp_utc LIKE '2012%' AND list_followers BETWEEN 1 AND 2 ORDER BY list_update_timestamp_utc DESC LIMIT 1

Database: disney
Question: Who is the villain in the movie "The Great Mouse Detective"?
Evidence: The Great Mouse Detective refers to movie_title = 'The Great Mouse Detective';
SQL: SELECT villian FROM characters WHERE movie_title = 'The Great Mouse Detective'

Database: movie_3
Question: Provide the full names and emails of customers whose payments were greater than 70% of the average.
Evidence: full name refers to first_name, last_name; average payment refers to AVG(amount); payments were greater than 70% of the average refers to amount > (AVG(amount) MULTIPLY 0.7)
SQL: SELECT DISTINCT T2.first_name, T2.last_name, T2.email FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T2.address_id = T3.address_id WHERE T1.amount > ( SELECT AVG(amount) FROM payment ) * 0.7

Database: cookbook
Question: How many cups of almonds do you need for a chicken pocket sandwich?
Evidence: cups is a unit; almonds is a name of an ingredient; chicken pocket sandwich refers to title
SQL: SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Chicken Pocket Sandwich' AND T3.name = 'almonds' AND T2.unit = 'cup(s)'

Database: video_games
Question: How many games did BMG Interactive Entertainment release in 2012?
Evidence: BMG Interactive Entertainment refers to publisher_name = 'BMG Interactive Entertainment'; release in 2012 refers to release_year = 2012;
SQL: SELECT COUNT(DISTINCT T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id WHERE T3.release_year = 2012

Database: student_loan
Question: Student21 is enlisted in which organization and has the student been absent?
Evidence: organization refers to organ
SQL: SELECT T2.month, T1.organ FROM enlist AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.`name` = T2.`name` WHERE T1.name = 'student21'

Database: sales
Question: Among the customers whose first name is Cameron, who bought the product in the most quantity?
Evidence: most quantity refers to MAX(Quantity); who refers to FirstName, LastName;
SQL: SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.FirstName = 'Cameron' ORDER BY T2.Quantity DESC LIMIT 1

Database: donor
Question: Write down the need statement of Family History Project.
Evidence: Family History Project refer to title, need statement refer to need_statement
SQL: SELECT need_statement FROM essays WHERE title = 'Family History Project'

Database: talkingdata
Question: How many users are there in the Home Decoration category?
SQL: SELECT COUNT(T1.app_id) FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T2.label_id = T1.label_id WHERE T2.category = 'Home Decoration'