Database: university
Question: Which country is University of Veterinary Medicine Vienna located in? Give its country id.
Evidence: University of Veterinary Medicine Vienna refers to university_name = 'University of Veterinary Medicine Vienna';
SQL: SELECT country_id FROM university WHERE university_name = 'University of Veterinary Medicine Vienna'

Database: image_and_language
Question: How many object samples in image no.1 are in the class of "man"?
Evidence: object samples refers to OBJ_CLASS_ID; image no.1 refers to IMG_ID = 1; in the class of "man" refers to OBJ_CLASS = 'man'
SQL: SELECT SUM(CASE WHEN T1.OBJ_CLASS = 'man' THEN 1 ELSE 0 END) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 1

Database: olympics
Question: Where is competitor Estelle Nze Minko from?
Evidence: Where competitor is from refers to region_name;
SQL: SELECT T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'Estelle Nze Minko'

Database: video_games
Question: List by name all the games released in the year 2010.
Evidence: name of the games refers to game_name; released in the year 2010 refers to release_year = 2010;
SQL: SELECT T1.game_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 WHERE T3.release_year = '2010'

Database: chicago_crime
Question: What is the name of the community with the highest population?
Evidence: name of the community refers to community_area_name; the highest population refers to max(population)
SQL: SELECT community_area_name FROM Community_Area ORDER BY population DESC LIMIT 1

Database: video_games
Question: What are the top 2 platforms with the most sales in North America?
Evidence: platforms refers to platform_name; most sales refers to MAX(num_sales); North America refers to region_name = 'North America';
SQL: SELECT T4.platform_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T1.region_name = 'North America' ORDER BY T2.num_sales DESC LIMIT 2

Database: books
Question: Provide the customers' names who ordered the Fantasmas.
Evidence: "Fantasmas" is the title of the book; customer names refers to first_name, last_name
SQL: SELECT T4.first_name, T4.last_name FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T1.title = 'Fantasmas'

Database: retails
Question: What is the nationality of supplier number 1?
Evidence: nationality refers to n_name; supplier number 1 refers to s_suppkey = 1
SQL: SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_suppkey = 1

Database: retails
Question: What is the average supply cost for the part "hot spring dodger dim light"?
Evidence: average supply cost refers to avg(ps_supplycost); part "hot spring dodger dim light" refers to p_name = 'hot spring dodger dim light'
SQL: SELECT AVG(T1.ps_supplycost) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_name = 'hot spring dodger dim light'

Database: retails
Question: How many items shipped by REG AIR were ordered on March 22, 1995?
Evidence: items shipped by REG AIR refer to l_linenumber where l_shipmode = 'REG AIR'; ordered on March 22, 1995 refers to o_orderdate = '1995-03-22';
SQL: SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T2.l_shipmode = 'REG AIR' AND T1.o_orderdate = '1995-03-22'

Database: software_company
Question: Among the male customers with an level of education of 4 and below, list their income K.
Evidence: male customers with an level of education of 4 and below refer to SEX = 'Male' where EDUCATIONNUM < 4;
SQL: SELECT INCOME_K FROM Demog WHERE GEOID IN ( SELECT GEOID FROM Customers WHERE EDUCATIONNUM < 4 AND SEX = 'Male' )

Database: menu
Question: How many menus were created for steamship?
Evidence: steamship refers to venue = 'STEAMSHIP';
SQL: SELECT COUNT(*) FROM Menu WHERE venue = 'STEAMSHIP'

Database: airline
Question: Among the flights on 2018/8/1, how many of them departed from an airport in New York?
Evidence: on 2018/8/1 refers to FL_DATE = '2018/8/1'; departed from an airport in New York refers to ORIGIN = 'JFK';
SQL: SELECT COUNT(*) FROM Airlines WHERE FL_DATE = '2018/8/1' AND ORIGIN = 'JFK'

Database: simpson_episodes
Question: How many episodes have the keyword "2d animation"?
SQL: SELECT COUNT(episode_id) FROM Keyword WHERE keyword = '2d animation';

Database: soccer_2016
Question: What is the second team's name in the match with the lowest winning margin?
Evidence: lowest winning margin refers to MIN(win_margin); team name refers to team_name; second team refers to team_2
SQL: SELECT T1.team_name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.team_2 ORDER BY T2.win_margin LIMIT 1

Database: olympics
Question: From 1900 to 1992, how many games did London host?
Evidence: From 1900 to 1992 refers to games_year BETWEEN 1900 AND 1992; London refers to city_name = 'London'; games refer to games_name;
SQL: SELECT COUNT(T3.id) FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'London' AND T3.games_year BETWEEN 1900 AND 1992

Database: movie_platform
Question: Among the lists created in 2016, which is the list that was updated most recently.
Evidence: created in 2016 refers to list_creation_timestamp_utc like '2016%'; updated most recently refers to MAX(list_update_timestamp_utc)
SQL: SELECT list_title FROM lists WHERE strftime('%Y', list_update_timestamp_utc) = '2016' ORDER BY list_update_timestamp_utc DESC LIMIT 1

Database: food_inspection_2
Question: How many employees have salary greater than 70000 but fail the inspection?
Evidence: salary greater than 70000 refers to salary > 70000; fail the inspection refers to results = 'Fail'
SQL: SELECT COUNT(DISTINCT T1.employee_id) FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.results = 'Fail' AND T1.salary > 70000

Database: disney
Question: List the PG-13 romantic comedy movie titles and their release dates.
Evidence: PG-13 refers to MPAA_rating = 'PG-13'; romantic comedy refers to genre = 'Romantic Comedy';
SQL: SELECT movie_title, release_date FROM movies_total_gross WHERE MPAA_rating = 'PG-13' AND genre = 'Romantic Comedy'

Database: food_inspection
Question: What is the name of the establishment with the highest number of low risk violations in 2014?
Evidence: establishment with the highest number of low risk violations refers to business_id where MAX(COUNT(risk_category = 'Low Risk')); year(date) = 2014;
SQL: SELECT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2014' AND T1.risk_category = 'Low Risk' GROUP BY T2.name ORDER BY COUNT(T2.business_id) DESC LIMIT 1

Database: beer_factory
Question: Among the transactions, what percentage is done by using a visa card?
Evidence: visa card refers to CreditCardType = 'Visa'; percentage = MULTIPLY(DIVIDE(SUM(CreditCardType = 'Visa'), COUNT(TransactionID)), 1.0);
SQL: SELECT CAST(COUNT(CASE WHEN CreditCardType = 'Visa' THEN TransactionID ELSE NULL END) AS REAL) * 100 / COUNT(TransactionID) FROM `transaction`