Database: simpson_episodes
Question: What year did the Simpsons receive its first ever award for Favorite Animated Comedy in People's Choice Award?
Evidence: "Favorite Animated Comedy" is the award; 'People's Choice Award' is the award_category; received award refers to result = 'Winner'; first ever award refers to Min(year)
SQL: SELECT year FROM Award WHERE result = 'Winner' AND award = 'Favorite Animated Comedy' ORDER BY year DESC LIMIT 1;

Database: sales
Question: Give the product ID and name of the product with the highest prices among the quantity ranges from 400 to 500.
Evidence: highest prices refers to MAX(Price); quantity ranges from 400 to 500 refers to Quantity BETWEEN 400 AND 500;
SQL: SELECT T1.ProductID, T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.quantity BETWEEN 400 AND 500 ORDER BY T1.Price DESC LIMIT 1

Database: menu
Question: Give me the name and menu price of dishes that were free.
Evidence: dishes that were free refers to lowest_price = 0;
SQL: SELECT T2.name, T1.price FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE T2.lowest_price = 0

Database: synthea
Question: Describe the condition of patient Wilmer Koepp.
SQL: SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Wilmer' AND T1.last = 'Koepp'

Database: professional_basketball
Question: What's the name of the player in 1996 who had the most steals that didn't play in the playoffs?
Evidence: name of the player refers to first_name, middle_name, last_name; in 1996 refers to year = 1996; the most steals refers to max(steals); didn't play in the playoffs refers to playoff = null
SQL: SELECT T1.playerID FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1996 AND T2.PostGP = 0 ORDER BY T2.steals DESC LIMIT 1

Database: codebase_comments
Question: What is the url for repository that has the longest processed time solution?
Evidence: Url for repository refers to Url; longest processed toe trefers to MAX(ProcessedTime);
SQL: SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.ProcessedTime = ( SELECT MAX(ProcessedTime) FROM Solution )

Database: movie_3
Question: List the full names of customers who have paid more than 10$.
Evidence: full name refers to first_name, last_name; more than 10$ refers to amount > 10
SQL: SELECT T2.first_name, T2.last_name FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T1.amount > 10

Database: retail_world
Question: How much lower in percentage is the unit price of Ikura in order no. 10273 than its standard unit price?
Evidence: how much lower in percentage = MULTIPLY(DIVIDE(SUBTRACT(Products.UnitPrice, Order Details.UnitPrice), Products.UnitPrice), 100); Ikura refers to ProductName = 'Ikura'; order no. refers to OrderID;
SQL: SELECT CAST((T1.UnitPrice - T2.UnitPrice) AS REAL) * 100 / T1.UnitPrice FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura'

Database: movie_3
Question: List down the actor ID of actors with Dee as their last name.
SQL: SELECT actor_id FROM actor WHERE last_name = 'Dee'

Database: bike_share_1
Question: Which were the trips that started at Mountain View City Hall and ended on a rainy day?
Evidence: started at refers to start_station_name; start_station_name = 'Mountain View City Hall'; ended on a rainy day refers to end_date where events = 'rain';
SQL: SELECT T1.id FROM trip AS T1 INNER JOIN weather AS T2 WHERE T2.events = 'Rain' AND T1.start_station_name = 'Mountain View City Hall'

Database: talkingdata
Question: Among the female users that uses OPPO as their phone brand, what is the percentage of them of the user that uses R815T model to install the app?
Evidence: female refers to gender = 'F'; percentage = DIVIDE(SUM(IF(phone_brand = 'OPPO',1,0)), SUM(IF(device_id = 'R815T',1,0))); R815T refers to device_id = 'R815T';
SQL: SELECT SUM(IIF(T1.phone_brand = 'OPPO', 1, 0)) / SUM(IIF(T1.device_id = 'R815T', 1, 0)) AS num FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T2.gender = 'F'

Database: public_review_platform
Question: Give the number of "drive-thru" businesses in "Scottsdale" with business ID number less than "1000".
Evidence: drive-thru refers to attribute_name = 'Drive-Thru' AND attribute_value = 'true'; Scottsdale refers to city = 'Scottsdale'; business_id < 1000;
SQL: SELECT T2.business_id FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T3.business_id < 1000 AND T3.city LIKE 'Scottsdale' AND T1.attribute_name LIKE 'Drive-Thru' AND T2.attribute_value LIKE 'TRUE'

Database: public_review_platform
Question: How many types of music does Yelp business No."1141" have?
Evidence: types of music refers to attribute_name LIKE '%music%' WHERE attribute_value = 'true'; business No. refers to business_id;

SQL: SELECT COUNT(T1.attribute_name) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_value LIKE 'TRUE' AND T2.business_id = 1141

Database: bike_share_1
Question: How many trips which start station and end station are the same?
Evidence: start station refers to start_station_id; end station refers to end_station_id; start station and end station are the same refers to start_station_id = end_station_id;
SQL: SELECT SUM(IIF(start_station_id = end_station_id, 1, 0)) FROM trip

Database: ice_hockey_draft
Question: What is the difference in the number of goals scored by Pavel Brendl during the regular season versus the playoffs in the 1998-1999 season?
Evidence: difference = SUBTRACT(SUM(G WHERE GAMETYPE = 'Regular Season'), SUM(G WHERE GAMETYPE = 'Playoffs') WHERE SEASON = '1998-1999'); number of goals scored refers to G; regular season refers to GAMETYPE = 'Regular Season'; playoffs refers to GAMETYPE = 'Playoffs'; 1998-1999 season refers to SEASON = '1998-1999';
SQL: SELECT T3.Rs_G - T4.Pf_G AS diff FROM ( SELECT T2.PlayerName, T1.G AS Rs_G FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Pavel Brendl' AND T1.SEASON = '1998-1999' AND T1.GAMETYPE = 'Regular Season' ) AS T3 INNER JOIN ( SELECT T2.PlayerName, T1.G AS Pf_G FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Pavel Brendl' AND T1.SEASON = '1998-1999' AND T1.GAMETYPE = 'Playoffs' ) AS T4 ON T3.PlayerName = T4.PlayerName

Database: movielens
Question: Please list director IDs who have the quality of at least 3 and have made at least 2 different genres of movies.
SQL: SELECT T1.directorid FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.d_quality >= 3 GROUP BY T1.directorid HAVING COUNT(T2.movieid) >= 2

Database: image_and_language
Question: Calculate the ratio of the total number of images with an object class of "man" and "person".
Evidence: DIVIDE(COUNT(IMG_ID where OBJ_CLASS = 'man'), COUNT(IMG_ID where OBJ_CLASS = 'person'));
SQL: SELECT CAST(COUNT(CASE WHEN T2.OBJ_CLASS = 'man' THEN 1 ELSE 0 END) AS REAL) / COUNT(CASE WHEN T2.OBJ_CLASS = 'person' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID