Database: olympics
Question: What is the percentage of people whose age greater than 24 and participate in winter season?
Evidence: DIVIDE(COUNT(season = 'Winter' and age > 24), COUNT(person_id)) as percentage;
SQL: SELECT CAST(COUNT(CASE WHEN T2.age > 24 AND T1.season = 'Winter' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.games_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id

Database: soccer_2016
Question: Among the players who use the right hand as their batting hand, how many of them were born after 1985?
Evidence: right hand as batting hand refers to Batting_Hand = 'Right-hand bat'; born after 1985 refers to SUBSTR(DOB, 1, 4) > 1985
SQL: SELECT SUM(CASE WHEN SUBSTR(T1.DOB, 1, 4) > 1985 THEN 1 ELSE 0 END) FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id WHERE T2.Batting_Hand = 'Right-hand bat'

Database: public_review_platform
Question: What is the total number of active businesses in AZ with a medium review count?
Evidence: active businesses refers to active = 'true'; AZ is a state; medium review count refers to review_count = 'Medium'
SQL: SELECT COUNT(business_id) FROM Business WHERE review_count = 'Medium' AND state = 'AZ' AND active = 'true'

Database: regional_sales
Question: Among the sales with 40% discount via in-store channel, how many products were shipped from warehouse code of WARE-NMK1003?
Evidence: 40% discount refers to Discount Applied = 0.4; in-store channel refers to Sales Channel = 'In-Store'; orders refer to OrderNumber;
SQL: SELECT COUNT(DISTINCT T) FROM ( SELECT CASE  WHEN `Sales Channel` = 'In-Store' AND WarehouseCode = 'WARE-NMK1003' AND `Discount Applied` = '0.4' THEN OrderNumber ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL

Database: books
Question: For the publisher which published the most books, show its name.
Evidence: published the most books refers to Max(Count(book_id)); publisher refers to publisher_name
SQL: SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id GROUP BY T2.publisher_name ORDER BY COUNT(T2.publisher_id) DESC LIMIT 1

Database: university
Question: List the name of universities located in Spain.
Evidence: name of universities refers to university_name; located in Spain refers to country_name = 'Spain';
SQL: SELECT T1.university_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Spain'

Database: college_completion
Question: List the all the institutes from the state with the most number of American Indian in 2007.
Evidence: institutes refers to chronname; American Indian refers to race = 'Ai'; most number of American Indian refers to MAX(COUNT(race = 'Ai')); in 2007 refers to year = '2007';
SQL: SELECT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2007 AND T2.race = 'Ai' GROUP BY T1.chronname ORDER BY COUNT(T1.chronname) DESC LIMIT 1

Database: beer_factory
Question: What is the credit card type used by Kenneth Walton?
Evidence: FALSE;
SQL: SELECT DISTINCT T2.CreditCardType FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Kenneth' AND T1.Last = 'Walton'

Database: student_loan
Question: How many unemployed students are there that have been absent for 6 months?
Evidence: absent for 6 months refers to month = 6;
SQL: SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T1.`name` = T2.name WHERE T1.`month` = 6

Database: books
Question: How many percent of orders in 2020 used international shipping?
Evidence: international shipping refers to method_name = 'International'; orders in 2020 refers to order_date = '2020%'; percentage = Divide (Sum(method_name = 'International'), Count(order_id)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T2.method_name = 'International' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cust_order AS T1 INNER JOIN shipping_method AS T2 ON T1.shipping_method_id = T2.method_id WHERE STRFTIME('%Y', T1.order_date) = '2020'

Database: simpson_episodes
Question: What is the credited cast for the episode "In the Name of the Grandfather"?
Evidence: credited cast refers to category = 'Cast' and  credited = 'true'; episode "In the Name of the Grandfather" refers to title = 'In the Name of the Grandfather'
SQL: SELECT DISTINCT T2.person FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'In the Name of the Grandfather' AND T2.category = 'Cast' AND T2.credited = 'true';

Database: video_games
Question: Among the games published by 10TACLE Studios, how many of them are puzzles?
Evidence: published by 10TACLE Studios refers to publisher_name = '10TACLE Studios'; puzzle refers to genre_name = 'Puzzle'
SQL: SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T4.genre_name = 'Puzzle' AND T3.publisher_name = '10TACLE Studios'

Database: food_inspection
Question: Describe the inspection types and violation descriptions under moderate risk category for ART's CAFÉ.
Evidence: ART's CAFÉ is the name of the business; moderate risk category refers to risk_category = 'Moderate Risk';
SQL: SELECT DISTINCT T2.type, T1.description FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN businesses AS T3 ON T2.business_id = T3.business_id WHERE T3.name = 'ART''S CAFÉ' AND T1.risk_category = 'Moderate Risk'

Database: talkingdata
Question: How many events were held at coordinate 97,40?
Evidence: coordinate 97,40 refers to longitude = 97 AND latitude = 40;
SQL: SELECT COUNT(event_id) FROM `events` WHERE latitude = 40 AND longitude = 97

Database: disney
Question: How many of Gary Trousdale's movies are adventure movies?
Evidence: Gary Trousdale refers director = 'Gary Trousdale'; the adventure movie refers to genre = 'Adventure';
SQL: SELECT COUNT(T.name) FROM ( SELECT T1.name FROM director AS T1 INNER JOIN movies_total_gross AS T2 ON T1.name = T2.movie_title WHERE T1.director = 'Gary Trousdale' AND T2.genre = 'Adventure' GROUP BY T1.name ) T

Database: retails
Question: List the phone number of the customer who placed orders with a total price of more than $300,000.
Evidence: phone number refers to c_phone; a total price of more than $300,000 refers to o_totalprice > 300000
SQL: SELECT T2.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice > 300000

Database: public_review_platform
Question: List any five of user ID who became elite user in 2006.
Evidence: year_id = '2006';
SQL: SELECT user_id FROM Elite WHERE year_id = 2006 LIMIT 5

Database: books
Question: Sum the total price of the orders for The Prophet book.
Evidence: "The Prophet" is the title of the book: total price refers to Sum(price)
SQL: SELECT SUM(T1.price) FROM order_line AS T1 INNER JOIN book AS T2 ON T1.book_id = T2.book_id WHERE T2.title = 'The Prophet'

Database: regional_sales
Question: Among the orders placed by Ei, how many orders have quantity greater than 4?
Evidence: Ei is the name of the customer; orders have quantity greater than 4 refer to OrderNumber WHERE Order Quantity > 4;
SQL: SELECT SUM(CASE WHEN T1.`Order Quantity` > 4 AND T2.`Customer Names` = 'Ei ' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID

Database: talkingdata
Question: What is the age of the youngest female device user?
Evidence: youngest refers to MIN(age); female refers to gender = 'F';
SQL: SELECT MIN(age) FROM gender_age WHERE gender = 'F'

Database: app_store
Question: What is the average review number for application with 5 rating?
Evidence: average review = AVG(Review); application refers to app; Rating = 5;
SQL: SELECT AVG(Reviews) FROM playstore WHERE Rating = 5