Database: sales
Question: Among all customers handled by Innes E. del Castillo, how many have purchased Short-Sleeve Classic Jersey, L?
Evidence: Short-Sleeve Classic Jersey, L' is name of product;
SQL: SELECT COUNT(T2.CustomerID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID WHERE T3.FirstName = 'Innes' AND T3.LastName = 'del Castillo' AND T1.Name = 'Short-Sleeve Classic Jersey, L' AND T3.MiddleInitial = 'e'

Database: professional_basketball
Question: Please list the team names which have at least 5 players were born in the same state.
Evidence: team name refers to teams.name; state that a player is born refers to birthState
SQL: SELECT DISTINCT name FROM teams WHERE tmID IN ( SELECT tmID FROM players_teams AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID WHERE T2.birthState IS NOT NULL GROUP BY T1.tmID, T2.birthState HAVING COUNT(*) > 5 )

Database: synthea
Question: From 7/9/2010 to 10/29/2013, how many black patients were immunized with the meningococcal MCV4P vaccine?
Evidence: From 7/9/2010 to 10/29/2013 refers to DATE between '2010-07-09' and '2013-10-29'; black patients refers to race = 'black'; immunized with the meningococcal MCV4P vaccine refers to immunizations.DESCRIPTION = 'meningococcal MCV4P';
SQL: SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'meningococcal MCV4P' AND T2.DATE BETWEEN '2010-07-09' AND '2013-10-29' AND T1.race = 'black'

Database: college_completion
Question: What is the average SAT value for incoming students in all of the schools located in the state with the lowest state appropriations to higher education in fiscal year 2011 per resident?
Evidence: average = DIVIDE(SUM(med_sat_value), SUM(chronname)); SAT value for incoming students refers to med_sat_value; lowest state appropriations to higher education in fiscal year 2011 per resident refers to MIN(state_appr_value);
SQL: SELECT AVG(t1.med_sat_value) FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON t1.state = t2.state ORDER BY t2.state_appr_value LIMIT 1

Database: shipping
Question: List the drivers who shipped the shipments to the least populated city.
Evidence: least populated city refers to Min(population); name refers to first_name, last_name
SQL: SELECT T3.first_name, T3.last_name FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id ORDER BY T2.population ASC LIMIT 1

Database: movie_platform
Question: Show the avatar of the user who gave the rating at 2019/10/17 1:36:36.
Evidence: at 2019/10/17 1:36:36 refers to rating_timestamp_utc = '2019/10/17 1:36:36'; avatar of the user refers to user_avatar_image_url


SQL: SELECT T2.user_avatar_image_url FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id WHERE T1.rating_timestamp_utc LIKE '2019-10-17 01:36:36'

Database: shipping
Question: What is the brand of the truck that is used to ship by Zachery Hicks?
Evidence: brand of truck refers to make
SQL: SELECT DISTINCT T1.make FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id INNER JOIN driver AS T3 ON T3.driver_id = T2.driver_id WHERE T3.first_name = 'Zachery' AND T3.last_name = 'Hicks'

Database: sales
Question: Calculate the total price for products from id 400 to 500.
Evidence: total price = SUM(MULTIPLY(Price, Quantity)); from id 400 to 500 refers to ProductID BETWEEN 400 AND 500;
SQL: SELECT SUM(T1.Price * T2.quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID BETWEEN 400 AND 500

Database: simpson_episodes
Question: List down the keyword and crew member's name for episode id S20-E1.
SQL: SELECT T1.keyword, T2.person FROM Keyword AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.episode_id = 'S20-E1';

Database: shakespeare
Question: Among the chapters in "As You Like It", how many chapters have a paragraph number of no more than 50?
Evidence: "As You Like It" refers to Title = 'As You Like It' ;paragraph number of no more than 50 refers to ParagraphNum < 50
SQL: SELECT COUNT(T3.chapter_id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T1.Title = 'As You Like It' AND T3.ParagraphNum < 50

Database: student_loan
Question: How many students are disabled?
SQL: SELECT COUNT(name) FROM disabled

Database: university
Question: In what year does the Brown University score the highest?
Evidence: Brown University refers to university_name = 'Brown University'; score the highest refers to MAX(score)
SQL: SELECT T1.year FROM university_ranking_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Brown University' ORDER BY T1.score DESC LIMIT 1

Database: cs_semester
Question: Mention the names and credits of course registered by the students who were under the supervision of female professor with the highest teaching ability.
Evidence: female refers to gender = 'Female'; highest teaching ability refers to MAX(teachingability);
SQL: SELECT T5.name, T5.credit 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 INNER JOIN registration AS T4 ON T3.student_id = T4.student_id INNER JOIN course AS T5 ON T4.course_id = T5.course_id WHERE T2.gender = 'Female' ORDER BY T2.teachingability DESC LIMIT 1

Database: beer_factory
Question: What is the name of the root beer brand with the lowest unit profit available to wholesalers?
Evidence: name of the root beer brand refers to BrandName; lowest unit profit available to wholesalers refers to MIN(SUBTRACT(CurrentRetailPrice, WholesaleCost));
SQL: SELECT BrandName FROM rootbeerbrand ORDER BY CurrentRetailPrice - WholesaleCost LIMIT 1

Database: talkingdata
Question: Give the number of female users of "E派" brand devices.
Evidence: female refers to gender = 'F'; E派 brand refers to phone_brand = 'E派';
SQL: SELECT COUNT(T2.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' AND T2.phone_brand = 'E派'

Database: books
Question: Provide the email of the customers that purchased books with a price range of 3 to 5 dollars.
Evidence: books with a price range of 3 to 5 dollars refers to price BETWEEN 3 AND 5
SQL: SELECT DISTINCT T3.email FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T1.price BETWEEN 3 AND 5

Database: law_episode
Question: Please list any three episodes that were most enjoyed by the viewers.
Evidence: episode refers to title; most enjoyed by the viewers refers to stars = 10
SQL: SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T2.stars = 10 LIMIT 3

Database: books
Question: Give the number of Ukrainian addresses in the database.
Evidence: Ukrainian address refers to country_name = 'Ukraine'
SQL: SELECT COUNT(*) FROM country AS T1 INNER JOIN address AS T2 ON T1.country_id = T2.country_id WHERE T1.country_name = 'Ukraine'

Database: public_review_platform
Question: Please provide the attribute values ​​of the bussinesses with fashion in Scottsdale.
Evidence: fashion refers to category_name = 'Fashion'; Scottsdale refers to city = 'Scottsdale';
SQL: SELECT T2.attribute_value FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T1.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T4.category_name LIKE 'Fashion' AND T1.city LIKE 'Scottsdale'