Database: image_and_language
Question: How many times is the number of images containing "broccoli" than "tomato"?
Evidence: images refers to IMG_ID; "broccoli" refers to OBJ_CLASS = 'broccoli'; "tomato" refers to OBJ_CLASS = 'tomato' ; How many times = divide(count(OBJ_SAMPLE_ID) when OBJ_CLASS = 'broccoli', count(OBJ_SAMPLE_ID) when OBJ_CLASS = 'tomato')
SQL: SELECT CAST(COUNT(CASE WHEN T1.OBJ_CLASS = 'broccoli' THEN T2.OBJ_SAMPLE_ID ELSE NULL END) AS REAL) / COUNT(CASE WHEN T1.OBJ_CLASS = 'tomato' THEN T2.OBJ_SAMPLE_ID ELSE NULL END) times FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID

Database: video_games
Question: Which year has the most number of PC games releases?
Evidence: year refers to release_year; the most number of releases refers to max(count(game_id))
SQL: SELECT T.release_year FROM ( SELECT T2.release_year, COUNT(DISTINCT T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'PC' GROUP BY T2.release_year ORDER BY COUNT(DISTINCT T3.game_id) DESC LIMIT 1 ) t

Database: university
Question: Give the criteria name where Harvard University scored 100.
Evidence: Harvard University refers to university_name = 'Harvard University'; scored 100 refers to score = 100
SQL: SELECT DISTINCT T3.criteria_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN ranking_criteria AS T3 ON T3.id = T2.ranking_criteria_id WHERE T1.university_name = 'Harvard University' AND T2.score = 100

Database: talkingdata
Question: How many labels belong to the game-card category?
Evidence: labels refers to label_id;
SQL: SELECT COUNT(label_id) FROM label_categories WHERE category = 'game-card'

Database: disney
Question: Wolfgang Reitherman has directed several Disney movies, which one has the highest grossing after accounting for inflation?
Evidence: Wolfgang Reitherman refers to director = 'Wolfgang Reitherman'; the highest grossing after accounting for inflation refers to MAX(inflation_adjusted_gross);
SQL: SELECT T1.movie_title FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Wolfgang Reitherman' ORDER BY CAST(REPLACE(SUBSTR(inflation_adjusted_gross, 2), ',', '') AS REAL) DESC LIMIT 1

Database: regional_sales
Question: Count the number of orders made from the store in city with population of 3000000 to 4000000.
Evidence: number of order refers to OrderNumber; population of 3000000 to 4000000 refers to Population BETWEEN 3000000 AND 4000000
SQL: SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.Population BETWEEN 3000000 AND 4000000

Database: public_review_platform
Question: How many businesses in Scottsdale are rated as "wonderful experience"?
Evidence: Scottsdale refers to city = 'Scottsdale'; rated refers to stars; rated as wonderful experience refers to stars > 3;
SQL: SELECT COUNT(business_id) FROM Business WHERE city LIKE 'Scottsdale' AND stars > 3

Database: world
Question: In English speaking countries, provide the difference between the number of countries with republic and constitutional monarchy as its government form.
Evidence: English speaking refers to Language = 'English' ; difference = SUBTRACT(COUNT(Language = 'English' WHERE GovernmentForm = 'Republic'), COUNT(Language = 'English' WHERE GovernmentForm = 'ConstitutionalMonarchy'));
SQL: SELECT COUNT(T1.GovernmentForm = 'Republic') - COUNT(T1.GovernmentForm = 'ConstitutionalMonarchy') FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English'

Database: regional_sales
Question: List the 5 sales teams that have made sales with the highest net profits.
Evidence: highest net profit = Max(Subtract (Unit Price, Unit Cost))
SQL: SELECT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 5

Database: movie_3
Question: Which country does Sasebo belong to?
Evidence: 'Sasebo' is a city
SQL: SELECT T1.country FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T2.city = 'Sasebo'

Database: cs_semester
Question: What are the names of the courses that the students with the lowest intelligence are least satisfied with?
Evidence: lower intelligence refers to intelligence = 1; sat refers to student's satisfaction degree with the course where least satisfaction refers to sat = 1;
SQL: SELECT T3.name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T2.sat = 1 AND T1.intelligence = 1

Database: retail_world
Question: Find and list the company name, company contact name, and contact title of customers from Madrid.
Evidence: from Madrid refers to City = 'Madrid'
SQL: SELECT CompanyName, ContactName, ContactTitle FROM Customers WHERE City = 'Madrid'

Database: soccer_2016
Question: Write down the name of players whose bowling skill is Legbreak.
Evidence: name of players refers to Player_Name
SQL: SELECT T2.Player_Name FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T1.Bowling_Id = T2.Bowling_skill WHERE T1.Bowling_skill = 'Legbreak'

Database: software_company
Question: What is the response and number of inhabitants of the oldest female customer?
Evidence: number of inhabitants refers to INHABITANTS_K; oldest female customer refers to SEX = 'Female' where MAX(age);
SQL: SELECT T2.RESPONSE, T3.INHABITANTS_K FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID INNER JOIN Demog AS T3 ON T1.GEOID = T3.GEOID WHERE T1.SEX = 'Female' ORDER BY T1.age DESC LIMIT 1

Database: beer_factory
Question: How many female customers permit the company to send regular emails to them?
Evidence: female refers to Gender = 'F'; customer permits the company to send regular emails to them refers to SubscribedToEmailList = 'TRUE';
SQL: SELECT COUNT(CustomerID) FROM customers WHERE Gender = 'F' AND SubscribedToEmailList = 'TRUE'

Database: retail_complains
Question: Write down the call id of clients whose first name start with alphabet "B".
Evidence: first name start with alphabet "B" refers to first like 'B%'
SQL: SELECT T2.call_id FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.first LIKE 'B%'

Database: professional_basketball
Question: How many All Star players who played in the 1973 season were black?
Evidence: 1973 season refers to season_id = 1973; black refers to race = 'B'
SQL: SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T2.season_id = 1973 AND T1.race = 'B'

Database: public_review_platform
Question: Among all the users who received the high number of compliments, what percent received the 'cute' type of compliment.
Evidence: high number of compliments refers to number_of_compliments = 'High'; percentage = divide(count(user_id where compliment_type = 'cute'), count(user_id))*100%
SQL: SELECT CAST(SUM(CASE WHEN T1.compliment_type = 'cute' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.user_id) FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T2.number_of_compliments = 'High'