Database: donor
Question: On how many projects where the teacher has ordered between 5 to 10 items are from are from Quill.com?
Evidence: ordered between 5 to 10 items refers to item_quantity between 5 and 10; are from Quill.com refers to vendor_name = 'Quill.com'
SQL: SELECT COUNT(projectid) FROM resources WHERE vendor_name = 'Quill.com' AND item_quantity BETWEEN 5 AND 10

Database: coinmarketcap
Question: Please name the coin that ranked first among the coins traded on April 29, 2013.
Evidence: ranked first refers to cmc_rank = 1; on April 29, 2013 refers to date = '2013-04-29'
SQL: SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-04-29' AND T2.cmc_rank = 1

Database: shipping
Question: For the shipment received by Leszek Kieltyka on 2017/9/25, what was its weight?
Evidence: on 2017/9/25 refers to ship_date = '2017-09-25'
SQL: SELECT T1.weight FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Leszek' AND T2.last_name = 'Kieltyka' AND T1.ship_date = '2017-09-25'

Database: student_loan
Question: Among the students who filed for bankruptcy with an absence in school of no more than 6 months, how many students enlisted for the fire department?
Evidence: absence of no more than 6 months refers to month < 6; department refers to organ; organ = 'fire_department';
SQL: SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name INNER JOIN enlist AS T3 ON T3.name = T2.name WHERE T3.organ = 'fire_department'

Database: video_games
Question: List down at least five publishers of the games with number of sales less than 10000.
Evidence: publishers refers to publisher_name; number of sales less than 10000 refers to num_sales < 0.1;
SQL: SELECT T.publisher_name FROM ( SELECT DISTINCT T5.publisher_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 game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN publisher AS T5 ON T4.publisher_id = T5.id WHERE T1.region_name = 'North America' AND T2.num_sales * 100000 < 10000 LIMIT 5 ) t

Database: chicago_crime
Question: Please list the area name of the communities in the Far north side, which has a population of more than 50000 but less than 70000.
Evidence: area name refers to community_area_name; the Far north side refers to side = 'Far North'; a population of more than 50000 but less than 70000 refers to population BETWEEN '50000' AND '70000'
SQL: SELECT community_area_name, side FROM Community_Area WHERE side = 'Far North ' AND population BETWEEN 50000 AND 70000

Database: sales
Question: Calculate the total quantity of products with name starting with alphabet "c".
Evidence: name starting with alphabet "c" refers to Name LIKE 'C%';
SQL: SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE SUBSTR(T1.Name, 1, 1) = 'C'

Database: ice_hockey_draft
Question: List out the nation of players who played for the 1997-1998 season .
Evidence: players refers to PlayerName; 1997-1998 season refers to SEASON = '1997-1998';
SQL: SELECT DISTINCT T2.nation FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1997-1998'

Database: software_company
Question: What is the occupation of customers within number of inhabitants ranges of 30 to 40?
Evidence: number of inhabitants ranges of 30 to 40 refers to INHABITANTS_K BETWEEN 30 AND 40;
SQL: SELECT DISTINCT T1.OCCUPATION FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T2.INHABITANTS_K >= 30 AND T2.INHABITANTS_K <= 40

Database: language_corpus
Question: How many Wikipedia pages are there on the language of the biwords pair "àbac-xinès"?
Evidence: àbac refers to word = 'àbac'; xinès refers to word = 'xinès'; Wikipedia pages refer to pages
SQL: SELECT COUNT(T1.pages) FROM langs AS T1 INNER JOIN biwords AS T2 ON T1.lid = T2.lid WHERE T2.w1st = ( SELECT wid FROM words WHERE word = 'àbac' ) AND T2.w2nd = ( SELECT wid FROM words WHERE word = 'xinès' )

Database: shooting
Question: What proportion of male police officers looked into events where people were injured?
Evidence: male refers to gender = 'M'; people were injured refers to subject_statuses = 'Injured'; proportion = divide(count(case_number where gender = 'M'), count(case_number)) where subject_statuses = 'Injured' * 100%
SQL: SELECT CAST(SUM(T2.gender = 'M') AS REAL) * 100 / COUNT(T1.case_number) FROM incidents T1 INNER JOIN officers T2 ON T1.case_number = T2.case_number WHERE T1.subject_statuses = 'Injured'

Database: image_and_language
Question: List all bounding box widths and heights of object sample ID 2.
Evidence: The bounding box's W and H abbreviations stand for the object's width and height respectively; object sample ID 2 refers to OBJ_SAMPLE_ID = 2;
SQL: SELECT W, H FROM IMG_OBJ WHERE OBJ_SAMPLE_ID = 2

Database: food_inspection_2
Question: Compare the number of inspections under toxic items and no-smoking regulations.
Evidence: under toxic items refers to category = 'Toxic Items'; no-smoking regulations refers to category = 'No Smoking Regulations'
SQL: SELECT COUNT(CASE WHEN T2.category = 'Toxic Items' THEN T1.inspection_id END) AS Tox_nums , COUNT(CASE WHEN T2.category = 'No Smoking Regulations' THEN T1.inspection_id END) AS NosmoNums FROM violation AS T1 INNER JOIN inspection_point AS T2 ON T1.point_id = T2.point_id

Database: law_episode
Question: What are the names of all the people who worked on episode 19 of season 9?
SQL: SELECT T3.name FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T1.episode = 19 AND T1.season = 9

Database: retail_world
Question: How many orders were shipped to Venezuela in 1996?
Evidence: shipped to Venezuela refers to ShipCountry = 'Venezuela'; in 1996 refers to year(ShippedDate) = '1996';
SQL: SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry = 'Venezuela' AND STRFTIME('%Y', ShippedDate) = '1996'

Database: craftbeer
Question: Which city and state produces the most and least bitter beer, and what is the difference in bitterness between the two? List also the names of the beer.
Evidence: The more IBU, the more bitter the beer is, most bitter means highest IBU; The less IBU, the less bitter the beer is, least bitter means lowest IBU
SQL: SELECT T1.state, T1.city, T2.name, T2.ibu FROM breweries AS T1 INNER JOIN beers AS T2 ON T1.id = T2.brewery_id GROUP BY T1.state, T1.city, T2.name, T2.ibu HAVING MAX(ibu) AND MIN(ibu) LIMIT 2

Database: food_inspection
Question: Which business had the lowest score for the unscheduled routine inspection on 2016/9/26? Give the name of the business.
Evidence: the lowest score for unscheduled routine inspection refers to type = 'Routine - Unscheduled' where MIN(score); date = '2016-09-26';
SQL: SELECT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE score = ( SELECT MIN(score) FROM inspections WHERE `date` = '2016-09-26' AND type = 'Routine - Unscheduled' ) AND T1.`date` = '2016-09-26' AND T1.type = 'Routine - Unscheduled'

Database: law_episode
Question: What is the title of the episode that has the highest number of crews in the Art Department?
Evidence: the highest number of crews refers to max(count(person_id)); in the Art Department refers to category = 'Art Department'
SQL: SELECT T2.title FROM Credit AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.category = 'Art Department' GROUP BY T2.episode_id ORDER BY COUNT(T1.category) DESC LIMIT 1