Database: public_review_platform
Question: Among the businesses with average rating, how many business has attribute of full_bar.
Evidence: average rating refers to avg(stars); attribute of full_bar refers to attribute_value = 'full_bar'
SQL: SELECT COUNT(T1.business_id) FROM Business_Attributes AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.attribute_value = 'full_bar'

Database: olympics
Question: Which cities hosted at least 3 Olympic games?
Evidence: cities refer to city_name; hosted at least 3 Olympic games refers to COUNT(games_id) > = 3;
SQL: SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id GROUP BY T2.id HAVING COUNT(T1.games_id) >= 3

Database: public_review_platform
Question: Please indicate the closing hours and business days of the businesses with the category named Doctors.
Evidence: closing hours refer to closing_time; business days refer to day_id from Business_Hours;
SQL: SELECT DISTINCT T3.opening_time, T3.day_id FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T1.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id WHERE T2.category_name = 'Doctors'

Database: retail_world
Question: How many suppliers are from UK?
Evidence: from UK refers to Country = 'UK'
SQL: SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'UK'

Database: retails
Question: How many in debt customers in the household market segment are from Russia?
Evidence: in debt customers refer to c_custkey where c_acctbal < 0; c_mktsegment = 'HOUSEHOLD'; Russian is the name of the nation which refers to n_name = 'RUSSIA';
SQL: SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_acctbal < 0 AND T1.c_mktsegment = 'HOUSEHOLD' AND T2.n_name = 'RUSSIA'

Database: app_store
Question: What is the percentage for free application with a rating 4.5 and above have not been updated since 2018?
Evidence: paid refers to Type = 'Paid'; application refers to App; Rating>4.5; Last Updated>'2018; percentage = DIVIDE(SUM(Genres = 'Mature 17+' and Rating>4.5 and substr("Last Updated",-4,4)>'2018' )), (COUNT(App)) as percent;
SQL: SELECT CAST(SUM(CASE WHEN SUBSTR('Last Updated', -4) > '2018' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(App) PER FROM playstore WHERE Type = 'Free' AND Rating >= 4.5

Database: college_completion
Question: Please list the names of the institutes in the state of Alabama whose all graduates in total exceeded 500 in 2011?
Evidence: names of the institutes refers to chronname; graduates refers to grad_cohort; grad_cohort > 500; in 2011 refers to year = 2011; all students refer to race = 'X'.
SQL: SELECT DISTINCT T1.chronname FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.state = 'Alabama' AND T2.year = 2011 AND T2.race = 'X' AND T2.grad_cohort > 500

Database: sales_in_weather
Question: What was the dew point on the day the most units of item no.5 were sold in store no.3 in 2012?
Evidence: item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; in 2012 refers to SUBSTR(date, 1, 4) = '2012': most units sold refers to Max(units)
SQL: SELECT dewpoint FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND SUBSTR(T1.`date`, 1, 4) = '2012' AND T1.item_nbr = 5 ORDER BY units DESC LIMIT 1

Database: car_retails
Question: How many transactions payment made by customer that is lower than 10000. Group the result by year.
Evidence: Transactions payment lower than 10000 refer to COUNT(amount) < 1000; by year refers to YEAR(paymentDate)
SQL: SELECT STRFTIME('%Y', t1.paymentDate), COUNT(t1.customerNumber) FROM payments AS t1 WHERE t1.amount < 10000 GROUP BY STRFTIME('%Y', t1.paymentDate)

Database: chicago_crime
Question: In which district have there been more intimidation-type crimes?
Evidence: more intimidation-type crime refers to Max(Count(primary_description = 'INTIMIDATION')); district refers to district_name
SQL: SELECT T3.district_name FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T1.primary_description = 'INTIMIDATION' GROUP BY T3.district_name ORDER BY COUNT(T1.primary_description) DESC LIMIT 1

Database: university
Question: Give the name of the university with the most number of students in 2015.
Evidence: most number of students refers to MAX(num_students); in 2015 refers to year = 2015; name of university refers to university_name;
SQL: SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2015 ORDER BY T1.num_students DESC LIMIT 1

Database: retails
Question: List the order key of the orders with a total price between 200000 and 300000.
Evidence: orders with a total price between 200000 and 300000 refer to o_totalprice between 200000 and 300000;
SQL: SELECT o_orderkey FROM orders WHERE o_totalprice BETWEEN 200000 AND 300000

Database: university
Question: What is the university ID of Harvard University?
Evidence: of Harvard University refers to university_name = 'Harvard University';
SQL: SELECT id FROM university WHERE university_name = 'Harvard University'

Database: video_games
Question: Mention the genre of the 2Xtreme.
Evidence: genre refers to genre_name; the 2Xtreme game refers to game_name = '2Xtreme'
SQL: SELECT T2.id FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '2Xtreme'

Database: donor
Question: What is the number of the year round school in Los Angeles?
Evidence: Los Angeles is school_city; year-round school refers to school_year_round = 't';
SQL: SELECT COUNT(school_year_round) FROM projects WHERE school_city = 'Los Angeles' AND school_year_round = 't'

Database: shipping
Question: How many shipments were ordered by a customer in Florida?
Evidence: customer in Florida refers to state = 'FL'
SQL: SELECT COUNT(T1.cust_id) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.state = 'FL'

Database: video_games
Question: Which publisher published the most games?
Evidence: publisher refers to publisher_name; the most games refers to max(count(game_id))
SQL: SELECT T.publisher_name FROM ( SELECT T1.publisher_name, COUNT(DISTINCT T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id GROUP BY T1.publisher_name ORDER BY COUNT(DISTINCT T2.game_id) DESC LIMIT 1 ) t

Database: public_review_platform
Question: Among the users who received low compliments from other users, which users joined Yelp in 2012?
Evidence: low compliments refers to number_of_compliments = 'Low'; joined Yelp in 2012 refers to user_yelping_since_year = 2012
SQL: SELECT DISTINCT T2.user_id FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = 2012 AND T2.number_of_compliments = 'Low'

Database: music_tracker
Question: Provide the name of the artist who released his or her Single-Table in 2012 with the highest number of downloads. Name the Single-Table title as well.
Evidence: title refers to groupName; the highest number of downloads refers to MAX(totalSnatched where groupYear = 2012 and releaseType = 'single');
SQL: SELECT artist, groupName FROM torrents WHERE groupYear = 2012 AND releaseType LIKE 'Single' ORDER BY totalSnatched DESC LIMIT 1

Database: synthea
Question: Describe the care plans of patient Major D'Amore's plan of care.
SQL: SELECT DISTINCT T2.DESCRIPTION FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Major' AND T1.last = 'D''Amore'