Database: retail_world
Question: What percentage does the shipment of products by Speedy Express to Sweden make up to the shipping company's total?
Evidence: Speedy Express is a company; Sweden is a ShipCountry; calculation = DIVIDE(SUM(ShipCountry = 'Sweden'), SEM(ShipCountry)) * 100
SQL: SELECT CAST(COUNT(CASE WHEN T1.ShipCountry = 'Sweden' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Speedy Express'

Database: food_inspection_2
Question: What is the job title of employee who did inspection ID 52269?
Evidence: job title refers to title
SQL: SELECT T1.title FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_id = 52269

Database: university
Question: Calculate the total number of students in universities located in Sweden.
Evidence: located in Sweden refers to country_name = 'Sweden'; number of students refers to num_students
SQL: SELECT SUM(T2.num_students) FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T3.country_name = 'Sweden'

Database: book_publishing_company
Question: Of the titles, which title is about the Carefully researched study of the effects of strong emotions on the body, which state-based publisher published this book, and what is the year-to-date sale?
Evidence: year to date sales refers to ytd_sales; about the title refers to notes
SQL: SELECT T1.title, T2.pub_name, T1.ytd_sales FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.notes = 'Carefully researched study of the effects of strong emotions on the body. Metabolic charts included.'

Database: public_review_platform
Question: How many businesses operating in the shopping business have opening times before 8AM?
Evidence: shopping business refers to category_name = 'Shopping'; opening time before 8AM refers to opening_time < '8AM';
SQL: SELECT COUNT(T3.business_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Business_Hours AS T4 ON T3.business_id = T4.business_id WHERE T4.opening_time < '8AM' AND T1.category_name LIKE 'Shopping'

Database: soccer_2016
Question: What is the total number of runs scored by the batsmen during the 2nd inning of the match ID 335988?
Evidence: number of runs refers to Runs_Scored; 2nd inning refers to Innings_No = 2
SQL: SELECT SUM(Runs_Scored) FROM Batsman_Scored WHERE Match_Id = 335988 AND Innings_No = 2

Database: law_episode
Question: How many winners have been awarded a Television award by the "American Bar Association Silver Gavel Awards for Media and the Arts"?
Evidence: winner refers to result = 'Winner'; Television award refers to award = 'Television'; the "American Bar Association Silver Gavel Awards for Media and the Arts" refers to organization = 'American Bar Association Silver Gavel Awards for Media and the Arts'
SQL: SELECT COUNT(award_id) FROM Award WHERE result = 'Winner' AND award = 'Television' AND organization = 'American Bar Association Silver Gavel Awards for Media and the Arts'

Database: language_corpus
Question: List the page number for Catalan language wikipedia pages containing the word 'Art' in the page title.
Evidence: containing the word 'Art' refers to title LIKE '% Art %'
SQL: SELECT page FROM pages WHERE title LIKE 'Art%' OR title LIKE '%Art%' OR title LIKE '%Art'

Database: simpson_episodes
Question: Name the title of the episode where Pamela Hayden voiced the character 'Ruthie.'
Evidence: "Pamela Hayden" is the person; voice the character 'Ruthie' refers to role = 'Ruthie'
SQL: SELECT T1.title FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.person = 'Pamela Hayden' AND T2.role = 'Ruthie';

Database: cookbook
Question: How many recipes are non-dairy?
Evidence: non-dairy refers to category NOT LIKE '%dairy"
SQL: SELECT COUNT(T2.recipe_id) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T2.ingredient_id = T1.ingredient_id INNER JOIN Nutrition AS T3 ON T3.recipe_id = T2.recipe_id WHERE T1.category NOT LIKE '%dairy%'

Database: bike_share_1
Question: In which city's station is a bike borrowed on trip ID4069?
Evidence: bike is borrowed from refers to start_station_id;
SQL: SELECT T2.city FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.id = 4069

Database: simpson_episodes
Question: Find the average height for each person.
Evidence: average high = Divide(Sum(height_meters), Count(name))
SQL: SELECT AVG(height_meters) FROM Person;

Database: image_and_language
Question: Describe the objects, their attributes, and the relationships that comprise the scene on image no. 1 within the bounding box, represented as (388, 369, 48, 128).
Evidence: objects refers to OBJ_CLASS; attributes refers to ATT_CLASS; relationships refers to PRED_CLASS; image no. 1 refers to IMG_ID = 1; bounding box, represented as (388, 369, 48, 128) refers to X = 388 and Y = 369 and W = 48 and H = 128
SQL: SELECT DISTINCT T2.OBJ_CLASS, T4.ATT_CLASS, T6.PRED_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID INNER JOIN IMG_OBJ_ATT AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN ATT_CLASSES AS T4 ON T3.ATT_CLASS_ID = T4.ATT_CLASS_ID INNER JOIN IMG_REL AS T5 ON T1.IMG_ID = T5.IMG_ID INNER JOIN PRED_CLASSES AS T6 ON T5.PRED_CLASS_ID = T6.PRED_CLASS_ID WHERE T1.IMG_ID = 1 AND T1.X = 388 AND T1.Y = 369 AND T1.W = 48 AND T1.H = 128

Database: books
Question: Among the books purchased by less than 1 dollar, what is the difference between the number of books with less than 500 pages and books with greater than 500 pages?
Evidence: book purchased by less than 1 dollar refers to price < 1; books with less than 500 pages refers to num_pages < 500; greater than 500 pages refers to num_pages > 500; Difference = Subtract (Count(book_id where num_pages < 500), Count(book_id where num_pages > 500))
SQL: SELECT SUM(CASE WHEN T1.num_pages < 500 THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.num_pages > 500 THEN 1 ELSE 0 END) AS dif FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T2.price < 1

Database: donor
Question: What is the total price of items brought from ABC School Supply with a listed type of Other? Also include the list of the buyers' coordinates and school districts they belong to.
Evidence: ABC School Supply refer to vendor_name; listed type as Other refer to project_resource_type = 'Other'; coordinates refer to coordinates(school_latitude, school_longitude); total price of items refer to SUM(MULTIPLY(item_unit_price, item_quantity where vendor_name = ’ABC School Supply’))


SQL: SELECT T2.item_unit_price * T2.item_quantity price, T1.school_latitude, T1.school_longitude FROM projects AS T1 INNER JOIN resources AS T2 ON T1.projectid = T2.projectid WHERE T2.vendor_name = 'ABC School Supply' AND T2.project_resource_type = 'Other' AND T1.school_district = 'Hillsborough Co Pub Sch Dist'

Database: car_retails
Question: What is the percentage of employees are in Paris office?
Evidence: DIVIDE(COUNT(employeeNumber) when city = 'Paris'), (COUNT(employeeNumber)) as percentage;
SQL: SELECT CAST(COUNT(CASE WHEN t1.city = 'Paris' THEN t2.employeeNumber ELSE NULL END) AS REAL) * 100 / COUNT(t2.employeeNumber) FROM offices AS t1 INNER JOIN employees AS t2 ON t1.officeCode = t2.officeCode

Database: menu
Question: Who are the sponsors of the menu whose image full height is more than 10000 mm?
Evidence: image full height is more than 10000 mm refers to full_height > 10000;
SQL: SELECT T2.sponsor FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id WHERE T1.full_height = 10000