Database: chicago_crime
Question: Calculate the average crime rate per month in the highest populous area.
Evidence: the highest populous refers to max(population); average crime rate per month = divide(count(report_no where population = max(population)), 12)
SQL: SELECT CAST(COUNT(T2.report_no) AS REAL) / 12 FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no GROUP BY T1.community_area_no HAVING COUNT(T1.population) ORDER BY COUNT(T1.population) LIMIT 1

Database: public_review_platform
Question: How many user ids from 1 to 20 have no fan users and have low ratings?
Evidence: user_id BETWEEN 1 AND 20; no fan users refers to user_fans = 'None'; low ratings refers to user_review_count = 'Low';
SQL: SELECT COUNT(user_id) FROM Users WHERE user_id BETWEEN 1 AND 20 AND user_fans LIKE 'None' AND user_review_count LIKE 'Low'

Database: regional_sales
Question: How many stores procured products on October 27, 2018, in the city of Oregon?
Evidence: October 27, 2018 refers to ProcuredDate = '10/27/18'; 'Oregon' is the State
SQL: SELECT SUM(CASE WHEN T1.ProcuredDate = '10/27/18' AND T2.`City Name` = 'Orlando' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID

Database: movies_4
Question: What is the ID of the production company which produced the movie "Gladiator"?
Evidence: ID of the production company refers to company_id; movie "Gladiator" refers to title = 'Gladiator'
SQL: SELECT T2.company_id FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'Gladiator'

Database: law_episode
Question: Which episode got the most 1 star votes? Give its title.
Evidence: the most refers to max(votes); 1 star refers to stars = '1'
SQL: SELECT T2.title FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id WHERE T1.stars = 1 ORDER BY T1.votes DESC LIMIT 1

Database: computer_student
Question: How many advisors are in charge of advising all the students in 1st year?
Evidence: advisors refers to p_id_dummy; students in 1st year refers to student = 1 and yearsInProgram = 'Year_1'
SQL: SELECT COUNT(T1.p_id_dummy) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram = 'Year_1' AND T2.student = 1

Database: retail_world
Question: How many sales associates are located in Sao Paulo, Brazil?
Evidence: sales associates refer to ContactTitle; Sao Paulo is the name of the city in the country Brazil;
SQL: SELECT COUNT(CustomerID) FROM Customers WHERE City = 'Sao Paulo' AND Country = 'Brazil' AND ContactTitle = 'Sales Associate'

Database: food_inspection_2
Question: Name the taverns that failed the inspection in January 2010.
Evidence: tavern refers to facility_type = 'Tavern'; failed the inspection refers to results = 'Fail'; in January 2010 refers to inspection_date like '2010-01%'
SQL: SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE strftime('%Y-%m', T2.inspection_date) = '2010-01' AND T2.results = 'Fail' AND T1.facility_type = 'TAVERN'

Database: retail_complains
Question: What percentage of clients who sent their complaints by postal mail are age 50 and older?
Evidence: percentage = MULTIPLY(DIVIDE(SUM("Submitted via" = 'Postal mail'), COUNT(client_id)), 1.0); sent their complaints by refers to "Submitted via"; age > 50;
SQL: SELECT CAST(SUM(CASE WHEN T1.age > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.`Submitted via`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Postal mail'

Database: sales
Question: Indicate the quantity of Blade products sold.
Evidence: Blade' is name of product;
SQL: SELECT DISTINCT T2.Quantity FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Blade'

Database: cs_semester
Question: What is the percentage of Professor Ogdon Zywicki's research assistants are taught postgraduate students?
Evidence: research assistant refers to the student who serves for research where the abbreviation is RA; taught postgraduate student refers to type = 'TPG'; DIVIDE(COUNT(student_id where type = 'TPG' and first_name = 'Ogdon', last_name = 'Zywicki'), COUNT(first_name = 'Ogdon', last_name = 'Zywicki')) as percentage;
SQL: SELECT CAST(SUM(CASE WHEN T3.type = 'TPG' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.student_id) FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T1.student_id = T3.student_id WHERE T2.first_name = 'Ogdon' AND T2.last_name = 'Zywicki'

Database: authors
Question: How many papers are published under the conference "Mathematics of Program Construction
"?
Evidence: 'Mathematics of Program Construction' is the FullName of conference
SQL: SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'Mathematics of Program Construction'

Database: professional_basketball
Question: Which winning team in the 1947 playoff quarterfinals managed to score 3,513 defensive points that same year?
Evidence: team refers to tmID; quarterfinal refers to round = 'QF'; score 3,513 defensive points refers to d_pts > = 3513
SQL: SELECT T2.tmID FROM series_post AS T1 INNER JOIN teams AS T2 ON T1.tmIDWinner = T2.tmID WHERE T1.year = 1947 AND T1.round = 'QF' AND T2.d_pts = 3513

Database: world_development_indicators
Question: What is the lending category of the country with a cereal production of 6140000 metric tons for the year 1966?
Evidence: cereal production of 6140000 metric tons refers value where IndicatorName = 'Cereal production (metric tons)'> 6140000; the year 1966 refers to Year = '1966'
SQL: SELECT T1.LendingCategory FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IndicatorName = 'Cereal production (metric tons)' AND T2.Value = 6140000 AND T2.Year = 1966

Database: synthea
Question: Who is the patient with a body weight of 61.97 kg?
Evidence: body weight of 61.97 kg refers to observations.DESCRIPTION = 'Body Weight' AND observations.VALUE = 61.97; observations.UNITS = 'kg'
SQL: SELECT T2.first, T2.last FROM observations AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Body Weight' AND T1.UNITS = 'kg' AND T1.VALUE = 61.97

Database: airline
Question: Among the flights with air carrier named Republic Airline, how many of the flights have departure delay of 30 minutes and above?
Evidence: Republic Airline refers to Description which contains 'Republic Airline'; departure delay of 30 minutes and above refers to DEP_DELAY > 30;
SQL: SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%Republic Airline%' AND T2.DEP_DELAY > 30

Database: student_loan
Question: How many students are enrolled in UCLA school?
Evidence: enrolled in UCLA refers to school = 'ucla';
SQL: SELECT COUNT(name) FROM enrolled WHERE school = 'ucla'

Database: restaurant
Question: What type of restaurant is most common in Monterey county?
Evidence: type refers to food_type; most common refers to max(count(food_type))
SQL: SELECT T2.food_type FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.county = 'Monterey' GROUP BY T2.food_type ORDER BY COUNT(T2.food_type) DESC LIMIT 1

Database: soccer_2016
Question: How many players with left-hand batting style are from India?
Evidence: left-hand batting style refers to Batting_hand = 'Left-hand bat'; India refers to Country_Name = 'India'
SQL: SELECT SUM(CASE WHEN T1.Batting_hand = 'Left-hand bat' THEN 1 ELSE 0 END) AS cnt FROM Batting_Style AS T1 INNER JOIN Player AS T2 ON T1.Batting_Id = T2.Batting_hand INNER JOIN Country AS T3 ON T2.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'India'