Database: legislator
Question: State the address of Amy Klobuchar at the term of 4th of January 2001.
Evidence: at the term of 4th of January 2001 refers to start = '2001-04-01';
SQL: SELECT T2.address FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Amy' AND T1.last_name = 'Klobuchar' AND T2.start = '2001-04-01'

Database: menu
Question: Among all the dishes that were once free, what is the name of the dish that had appeared on most menus?
Evidence: dishes that were once free refers to lowest_price = 0; appeared on most menus refers to MAX(menus_appeared);
SQL: SELECT name FROM Dish WHERE lowest_price = 0 ORDER BY menus_appeared DESC LIMIT 1

Database: sales_in_weather
Question: For the home weather station of store no.15, what was the dew point on 2012/2/18?
Evidence: store no. 15 refers to store_nbr = 15; on 2012/2/18 refers to date = '2012-02-18'
SQL: SELECT T1.dewpoint FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 15 AND T1.`date` = '2012-02-18'

Database: sales_in_weather
Question: Which station has the highest number of stores? Calculate the said station's average maximum temperature in February 2012.
Evidence: station with highest number of stores refers to station_nbr where Max(Count(store_nbr)); station refers to station_nbr; in February 2012 refers to substring (date, 1, 7) = '2012-02'; average maximum temperature = Divide(Sum(tmax), 29)
SQL: SELECT CAST(SUM(T2.tmax) AS REAL) / 29 FROM ( SELECT station_nbr FROM relation GROUP BY station_nbr ORDER BY COUNT(store_nbr) DESC LIMIT 1 ) AS T1 INNER JOIN weather AS T2 ON T1.station_nbr = T2.station_nbr WHERE SUBSTR(T2.`date`, 1, 7) = '2012-02'

Database: donor
Question: What is the total sum of the donations paid with an optional support in projects that reach more than 300 students?
Evidence: with an optional support refers to donation_included_optional_support = 't'; reach more than 300 students refers to students_reached>300
SQL: SELECT SUM(T2.dollar_amount) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.students_reached > 300 AND t2.donation_included_optional_support = 't'

Database: public_review_platform
Question: How many business have low check-in on Sunday at 10AM?
Evidence: on Sunday refers to day_of_week = 'Sunday'; low check-in at 10AM refers to label_time_10 = 'Low'
SQL: SELECT COUNT(T2.business_id) FROM Days AS T1 INNER JOIN Checkins AS T2 ON T1.day_id = T2.day_id WHERE T1.day_of_week = 'Sunday' AND T2.label_time_10 = 'Low'

Database: food_inspection
Question: What is the average score for "Chairman Bao" in all its unscheduled routine inspections?
Evidence: DIVIDE(SUM(score where type = 'Routine - Unscheduled' and name = 'Chairman Bao'), COUNT(type = 'Routine - Unscheduled' where name = 'Chairman Bao'));
SQL: SELECT CAST(SUM(CASE WHEN T2.name = 'Chairman Bao' THEN T1.score ELSE 0 END) AS REAL) / COUNT(CASE WHEN T1.type = 'Routine - Unscheduled' THEN T1.score ELSE 0 END) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id

Database: world_development_indicators
Question: What's the long name of the country that got 3000000 on the indicator Arms exports in 1960?
Evidence: long name refers to CountryName; got 3000000 on the indicator Arms exports refers to value where IndicatorName = 'Arms exports (SIPRI trend indicator values)' = 3000000; in 1960 refers to Year = 1960
SQL: SELECT T1.LongName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IndicatorName = 'Arms exports (SIPRI trend indicator values)' AND T2.Year = 1960 AND T2.Value = 3000000

Database: chicago_crime
Question: Provide case numbers, aldermen's full names, and district names of the crimes that happened in 0000X N FRANCISCO AVE.
Evidence: aldermen's full name refers to alderman_name_suffix, alderman_first_name, alderman_last_name; 0000X N FRANCISCO AVE refers to block = '0000X N FRANCISCO AVE'
SQL: SELECT T2.case_number, T3.alderman_first_name, T3.alderman_last_name, T1.district_name FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no INNER JOIN Ward AS T3 ON T2.ward_no = T3.ward_no WHERE T2.block = '0000X N FRANCISCO AVE' GROUP BY T2.case_number, T3.alderman_first_name, T3.alderman_last_name, T1.district_name

Database: college_completion
Question: List the basic of the institution in 2012 with race of all male students.
Evidence: in 2012 refers to year = '2012'; male refers to gender = 'M'; all students refer to race = 'X'.
SQL: SELECT DISTINCT T1.basic, T2.race FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.year = 2012 AND T2.gender = 'M' AND t2.race = 'X'

Database: bike_share_1
Question: Among the subscribers who rented a bike from South Van Ness at Market on 12/1/2013, whose duration was the shortest and to which station was the bike returned to? Indicate South Van Ness's dock count.
Evidence: South Van Ness at Market refers to start_station_name; subscriber refers to subscription_type; start_date = '12/1/2013'; the shortest duration refers to MIN(duration); which station was the bike returned to refers to end_station_name;
SQL: SELECT MIN(T2.duration), T2.end_station_name, COUNT(T2.start_station_name) FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name WHERE T2.start_date LIKE '12/1/2013%' AND T2.start_station_name = 'South Van Ness at Market' AND T2.subscription_type = 'Subscriber'

Database: chicago_crime
Question: How many incidents of domestic violence occurred in an abandoned building in 2018?
Evidence: domestic violence refers to domestic = 'TRUE'; in an abandoned building refers to location_description = 'ABANDONED BUILDING'; in 2018 refers to date LIKE '%2018%'
SQL: SELECT SUM(CASE WHEN location_description = 'ABANDONED BUILDING' THEN 1 ELSE 0 END) FROM Crime WHERE date LIKE '%2018%' AND domestic = 'TRUE'

Database: retail_world
Question: How many subordinates does employee ID 2 have and what is the biggest order in terms of value that his/her subordinates have created?
Evidence: subordinates of employee ID 2 refers to EmployeeID where ReportsTo = 2;  biggest order in terms of value refers to max(MULTIPLY(Quantity, UnitPrice))
SQL: SELECT COUNT(T1.EmployeeID), SUM(T3.Quantity * T3.UnitPrice) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID WHERE T1.ReportsTo = 2 ORDER BY SUM(T3.UnitPrice * T3.Quantity) DESC LIMIT 1

Database: legislator
Question: List all the junior senators in 1997.
Evidence: junior senators refers to state_rank = 'junior'; in 1997 refers to start like '1997%';
SQL: SELECT T1.first_name, T1.last_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.start LIKE '1997%' AND T2.state_rank = 'junior'

Database: movie_platform
Question: For all movies where users left a critic, find the movie name, user, rating and critics comments from the user.
Evidence: movies where users left a critic refers to critic IS NOT NULL; critic comments refers to critic;
SQL: SELECT T2.movie_title, T1.user_id, T1.rating_score, T1.critic FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.critic IS NOT NULL

Database: book_publishing_company
Question: Name the store with the highest quantity in sales? What is the least quantity title from the store's sale?
Evidence: qty is abbreviation for quantity; highest quantity refers to MAX(qty); least quantity refers to MIN(qty)
SQL: SELECT T3.stor_id, T2.title FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id INNER JOIN stores AS T3 ON T3.stor_id = T1.stor_id WHERE T3.stor_id = ( SELECT stor_id FROM sales GROUP BY stor_id ORDER BY SUM(qty) DESC LIMIT 1 ) GROUP BY T3.stor_id, T2.title ORDER BY SUM(T1.qty) ASC LIMIT 1