Database: olympics
Question: How many Belgian men have competed in an Olympic Games?
Evidence: Belgian men refer to gender = 'M' where region_name = 'Belgium';
SQL: SELECT COUNT(T2.person_id) 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 T1.region_name = 'Belgium' AND T3.gender = 'M'

Database: chicago_crime
Question: Please list the precise location coordinates of all the crimes in Central Chicago.
Evidence: location coordinates refers to latitude, longitude; Central Chicago refers to district_name = 'Central'
SQL: SELECT T2.latitude, T2.longitude FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.district_name = 'Central'

Database: human_resources
Question: What is the average salary of all employees with a 2 year degree position?
Evidence: 2 year degree refers to educationrequired = '2 year degree'; calculation = DIVIDE(SUM(salary), COUNT(positiontitle))
SQL: SELECT AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.educationrequired = '2 year degree'

Database: superstore
Question: State the highest profit made by Anna Chung's orders in the Central Superstore.
Evidence: highest profit refers to max(Profit)
SQL: SELECT MAX(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Anna Chung'

Database: movielens
Question: What's the ratio of gender in actors to actress in all the UK movies?
Evidence: UK is a country; Male actors mean that a_gender = 'M'; Female actors mean that a_gender = 'F'; ratio; ratio of gender in actors = count(a_gender = 'M') / a_gender = 'F'
SQL: SELECT CAST(SUM(IIF(T3.a_gender = 'M', 1, 0)) AS REAL) / SUM(IIF(T3.a_gender = 'F', 1, 0)) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid INNER JOIN actors AS T3 ON T2.actorid = T3.actorid WHERE T1.country = 'UK'

Database: talkingdata
Question: List at least 5 device models that are commonly used by female users.
Evidence: device models that are commonly used refers to MAX(COUNT(device_model)); female refers to gender = 'F';
SQL: SELECT T.device_model FROM ( SELECT T2.device_model, COUNT(T2.device_model) AS num FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' GROUP BY T2.device_model ) AS T ORDER BY T.num DESC LIMIT 5

Database: sales_in_weather
Question: How many units of item 7 have been sold by store 7 when the snow is less than 5 inches?
Evidence: item 7 refers to item_nbr = 7; store 7 refers to store_nbr = 7; snow is less than 5 inches refers to snowfall < 5
SQL: SELECT SUM(units) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr INNER JOIN sales_in_weather AS T3 ON T2.store_nbr = T3.store_nbr WHERE T2.store_nbr = 7 AND T3.item_nbr = 7 AND T1.snowfall < 5

Database: codebase_comments
Question: Give the number of watchers that the repository of the solution No. 338082 have.
Evidence: number of watchers refers to Watchers; solution number refers to Solution.Id;
SQL: SELECT T1.Watchers FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 338082

Database: college_completion
Question: Among the states with a public school count of 20 and below, list their race.
Evidence: public refers to control = 'Public'; school_count < 20;
SQL: SELECT DISTINCT T2.race FROM state_sector_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.stateid = T1.stateid WHERE T1.schools_count <= 20 AND T1.control = 'Public'

Database: video_games
Question: Calculate the percentage of games published by 'Brash Entertainment'?
Evidence: percentage = MULTIPLY(DIVIDE(SUM(publisher_name = 'Brash Entertainment'), COUNT(game_id)), 100.0); 'Brash Entertainment' refers to publisher_name = 'Brash Entertainment';
SQL: SELECT CAST(COUNT(CASE WHEN T1.publisher_name = 'Brash Entertainment' THEN T2.game_id ELSE NULL END) AS REAL) * 100 / COUNT(T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id

Database: food_inspection
Question: Among the inspections carried out in 2016, how many of them are routine?
Evidence: inspections carried out in 2016 refer to YEAR(date) = 2016; routine inspections refer to type = 'Routine - Unscheduled';
SQL: SELECT COUNT(`date`) FROM inspections WHERE STRFTIME('%Y', `date`) = '2016' AND type = 'Routine - Unscheduled'

Database: authors
Question: Who is the author of the publication named 'Real-Time Automata'?
Evidence: 'Real-Time Automata' is the title of paper; publication refers to title;
SQL: SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Real-Time Automata'

Database: cs_semester
Question: For the professor who is working with Harrietta Lydford, how is his popularity?
Evidence: research assistant refers to the student who serves for research where the abbreviation is RA; higher popularity means more popular; prof_id refers to professor’s ID;
SQL: SELECT T1.popularity FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.f_name = 'Harrietta' AND T3.l_name = 'Lydford'

Database: public_review_platform
Question: How many users with a long tip and 2 likes for their tip have a high number of fans?
Evidence: long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High'
SQL: SELECT COUNT(DISTINCT T1.user_id) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T2.tip_length = 'Long' AND T2.likes = 2 AND T1.user_fans = 'High'

Database: language_corpus
Question: What is the percentage of the words that have been repeated under 180 times in the Catalan language?
Evidence: repeated under 180 times refers to occurrences < 180; Catalan language refers to lang = 'ca'; DIVIDE(COUNT(words WHERE occurrences < 180 and lang = 'ca'), COUNT(words WHERE lang = 'ca')) as percentage;
SQL: SELECT CAST(COUNT(CASE WHEN T2.occurrences < 180 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.lid) FROM langs AS T1 INNER JOIN langs_words AS T2 ON T1.lid = T2.lid WHERE T1.lang = 'ca'

Database: retails
Question: Name of customer whose order is applied with the highest discount.
Evidence: customer name refers to c_name; the highest discount refers to max(l_discount)
SQL: SELECT T3.c_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey INNER JOIN customer AS T3 ON T1.o_custkey = T3.c_custkey ORDER BY T2.l_discount DESC LIMIT 1

Database: address
Question: Among the area code 787, list the country of the cities with a postal point type of unique postal office.
Evidence: postal point type of unique postal office refers to type = 'Unique Post Office';
SQL: SELECT DISTINCT T2.county FROM area_code AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code INNER JOIN zip_data AS T3 ON T1.zip_code = T3.zip_code WHERE T1.area_code = '787' AND T3.type = 'Unique Post Office'

Database: movie_3
Question: Please list the titles of any three action films.
Evidence: action is a name of category
SQL: SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Action' LIMIT 3

Database: retails
Question: What was the order date of items with the highest total price?
Evidence: the highest total price refers to MAX(o_totalprice);
SQL: SELECT o_orderdate FROM orders WHERE o_totalprice = ( SELECT MAX(o_totalprice) FROM orders )