Database: retail_world
Question: How many percent more orders were fulfilled with shipper company "United Package" than with "Speedy Express"?
Evidence: percent = divide(subtract(count(OrderID where CompanyName = 'United Package') , count(OrderID where CompanyName = 'Speedy Express')) , count(OrderID where CompanyName = 'Speedy Express')) * 100%
SQL: SELECT CAST((COUNT(CASE WHEN T2.CompanyName = 'United Package' THEN 1 ELSE NULL END) - COUNT(CASE WHEN T2.CompanyName = 'Speedy Express' THEN 1 ELSE NULL END)) AS REAL) * 100 / COUNT(CASE WHEN T2.CompanyName = 'Speedy Express' THEN 1 ELSE NULL END) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID

Database: cookbook
Question: How many ingredients must be rationed in the recipe "Raspberry Chiffon Pie"?
Evidence: Raspberry Chiffon Pie refers to title; ingredient must be rationed refers to max_qty = min_qty
SQL: SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Raspberry Chiffon Pie' AND T2.max_qty = T2.min_qty

Database: law_episode
Question: For the episode with the most votes, give its air date.
Evidence: the most votes refers to max(votes)
SQL: SELECT T2.air_date FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id GROUP BY T2.episode_id ORDER BY SUM(T1.votes) DESC LIMIT 1

Database: regional_sales
Question: Which Apollo Ltd customer's order number has the most expensive unit price, indicating the order date?
Evidence: "Apollo Ltd" is the Customer Names; most expensive unit price refers to max(Unit Price)
SQL: SELECT T1.OrderNumber, T1.OrderDate FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Apollo Ltd' ORDER BY T1.`Unit Price` DESC LIMIT 1

Database: codebase_comments
Question: How many methods in the same repository share a tokenized name that begins with "query language..."?
Evidence: methods refers to Name; tokenized name refers to NameTokenized; NameTokenized LIKE 'query language%';
SQL: SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized LIKE 'query language%'

Database: bike_share_1
Question: Name the city of the station that trip ID 585842 borrowed a bike and indicate when that station was first installed.
Evidence: when the station was first installed refers to installation_date;
SQL: SELECT T2.city, T2.installation_date FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.id = 585842

Database: simpson_episodes
Question: Describe the award title, person and character name of the award ID 326.
SQL: SELECT DISTINCT T1.award, T1.person, T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T2.award_id = 326;

Database: university
Question: Among the universities in Australia, how many of them have a student staff ratio of over 15 in 2011?
Evidence: in 2011 refers to year 2011; in Australia refers to country_name = 'Australia'; student staff ratio of over 15 refers to student_staff_ratio > 15
SQL: SELECT COUNT(*) 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 = 'Australia' AND T2.student_staff_ratio > 15 AND T2.year = 2011

Database: college_completion
Question: In Yale University, what is the average number of Black students per year who were bachelor's/equivalent-seeking cohort at 4-year institutions between 2002 to 2005?
Evidence: Yale University refers to chronname = 'Yale University'; average = DIVIDE(COUNT(race = 'B' WHERE cohort = '4y bach AND year BETWEEN 2002 AND 2005), 3); Black refers to race = 'B'; bachelor's/equivalent-seeking cohort at 4-year institutions refers to cohort = '4y bach'; between 2002 to 2005 refers to year BETWEEN '2002' AND '2005';
SQL: SELECT AVG(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Yale University' AND T2.year BETWEEN 2002 AND 2005 AND T2.race = 'B' AND T2.cohort = '4y bach'

Database: food_inspection
Question: Which restaurant had more low risk violation in inspections, Tiramisu Kitchen or OMNI S.F. Hotel - 2nd Floor Pantry?
Evidence: Tiramisu Kitchen and OMNI S.F. Hotel - 2nd Floor Pantry are names of the business; more low risk violations refer to MAX(COUNT(risk_category = 'Low Risk'));
SQL: SELECT CASE WHEN SUM(CASE WHEN T2.name = 'OMNI S.F. Hotel - 2nd Floor Pantry' THEN 1 ELSE 0 END) > SUM(CASE WHEN T2.name = 'Tiramisu Kitchen' THEN 1 ELSE 0 END) THEN 'OMNI S.F. Hotel - 2nd Floor Pantry' ELSE 'Tiramisu Kitchen' END AS result FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'Low Risk'

Database: retail_world
Question: When was the employee who handled order id 10281 hired?
Evidence: When was hired refers to HireDate
SQL: SELECT T1.HireDate FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10281

Database: image_and_language
Question: How many 'blue' attribute classes are there on image ID 2355735?
Evidence: blue' attribute classes on image ID 2355735 refer to ATT_CLASS = 'blue' where IMG_ID = 2355735;
SQL: SELECT COUNT(T1.ATT_CLASS) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.IMG_ID = 2355735 AND T1.ATT_CLASS = 'blue'

Database: food_inspection_2
Question: Among the inspections done by sanitarian Joshua Rosa, how many of them have the result of "pass"?
Evidence: have the result of "pass" refers to results = 'Pass'
SQL: SELECT COUNT(T2.inspection_id) FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.results = 'Pass' AND T1.first_name = 'Joshua' AND T1.last_name = 'Rosa'

Database: retail_world
Question: What is the salary range for sales representative in Northwind?
Evidence: salary range is BETWEEN max(Salary) AND min(Salary); sales representative is a title
SQL: SELECT ( SELECT MIN(Salary) FROM Employees WHERE Title = 'Sales Representative' ) AS MIN , ( SELECT MAX(Salary) FROM Employees WHERE Title = 'Sales Representative' ) AS MAX

Database: airline
Question: Provide the origin of the flight that has the shortest actual elapsed time.
Evidence: shortest actual elapsed time refers to MIN(ACTUAL_ELAPSED_TIME);
SQL: SELECT ORIGIN FROM Airlines ORDER BY ACTUAL_ELAPSED_TIME ASC LIMIT 1

Database: bike_share_1
Question: How many bikes can be borrowed in San Jose Diridon Caltrain Station at 12:06:01 on 2013/8/29?
Evidence: number of bikes that can be borrowed refers to bikes_available; San Jose Diridon Caltrain Station refers to name = 'San Jose Diridon Caltrain Station'; time = '2013/8/29 12:06:01'
SQL: SELECT T2.bikes_available FROM station AS T1 INNER JOIN status AS T2 ON T1.id = T2.station_id WHERE T1.name = 'San Jose Diridon Caltrain Station' AND T2.time = '2013/08/29 12:06:01'

Database: address
Question: Calculate the percentage of congress representatives from the Democrat party. Among them, how many postal points are in the Hawaii state?
Evidence: DIVIDE(COUNT(party = 'Democrat'), COUNT(congress_rep_id)) as percentage; postal points refer to zip_code; state = 'Hawaii';
SQL: SELECT CAST(SUM(CASE WHEN T1.party = 'Democrat' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*), SUM(CASE WHEN T1.state = 'Hawaii' THEN 1 ELSE 0 END) FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district

Database: image_and_language
Question: Indicating the bounding box of "kitchen" in image id 250.
Evidence: bounding box refers to X, Y, W, H from IMG_OBJ; "kitchen" in image id 250 refers to OBJ_CLASS = 'kitchen' where IMG_ID = 250;
SQL: SELECT T1.X, T1.Y, T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 250 AND T2.OBJ_CLASS = 'kitchen'