Database: regional_sales
Question: List the name of the customer with the most number of order quantity from 2018 to 2020.
Evidence: name of customer refers to Customer Names; from 2018 to 2020 refers to OrderDate between '1/1/2018' and '31/12/2020'; most number of order quantity refers to Order Quantity = 8
SQL: SELECT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID WHERE T2.OrderDate LIKE '%/%/18' OR T2.OrderDate LIKE '%/%/19' OR T2.OrderDate LIKE '%/%/20' ORDER BY T2.`Order Quantity` DESC LIMIT 1

Database: simpson_episodes
Question: Name all the person who involved in the making of simpson 20s episode that aired between October to November.
Evidence: aired between October to November refers to strftime('%m', air_date) between '10' and '11';
SQL: SELECT DISTINCT T2.person FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.air_date, 6, 2) BETWEEN '10' AND '11';

Database: retail_complains
Question: What is the longest server time when the call is about the issue of arbitration?
Evidence: longest server time refers to max(ser_time)
SQL: SELECT MAX(T1.ser_time) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.issue = 'Arbitration'

Database: movie_platform
Question: List all movies with the best rating score. State the movie title and number of Mubi user who loves the movie.
Evidence: best rating score refers to rating_score = 5; number of Mubi user who loves the movie refers to movie_popularity;
SQL: SELECT DISTINCT T2.movie_title, T2.movie_popularity FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 5

Database: shipping
Question: Give the phone of drivers who transported shipment weight of greater than 20000 pounds.
Evidence: shipment weight of greater than 20000 pounds refers to Sum(weight) > 20000
SQL: SELECT T2.phone FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id GROUP BY T2.driver_id HAVING SUM(T1.weight) > 20000

Database: public_review_platform
Question: Please indicate the review count of the "active life" businesses in Phoenix.
Evidence: active life refers to category_name = 'Active Life'; Phoenix refers to city = 'Phoenix';
SQL: SELECT COUNT(*) 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 WHERE T1.category_name = 'Active Life' AND T3.city = 'Phoenix'

Database: movie_3
Question: Calculate the percentage of customers who paid more than the average rent amount in store 1.
Evidence: store 1 refers to store_id = 1; average rent amount refers to AVG(amount); calculation = DIVIDE(amount > AVG(amount), COUNT(customer_id)) * 100
SQL: SELECT CAST(( SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T2.amount > ( SELECT AVG(amount) FROM payment ) ) AS REAL) * 100 / ( SELECT COUNT(customer_id) FROM customer )

Database: retail_world
Question: Provide employees' ID who are in-charge of territory ID from 1000 to 2000.
Evidence: territory ID from 1000 to 2000 refers to TerritoryID BETWEEN 1000 and 2000
SQL: SELECT EmployeeID FROM EmployeeTerritories WHERE TerritoryID BETWEEN 1000 AND 2000

Database: sales_in_weather
Question: How many units of item no.5 were sold in store no.3 on the day the temperature range was the biggest?
Evidence: item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; when the temperature range was the biggest refers to Max(Subtract(tmax, tmin))
SQL: SELECT t2.units FROM relation AS T1 INNER JOIN sales_in_weather AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T1.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T2.item_nbr = 5 ORDER BY t3.tmax - t3.tmin DESC LIMIT 1

Database: codebase_comments
Question: What is the task method of the tokenized name "string extensions to pascal case
"?
Evidence: method refers to Name; task of the method refers to the second part of the Name after the "."; tokenized name refers to NameTokenized; NameTokenized = 'string extensions to pascal case';
SQL: SELECT DISTINCT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE NameTokenized = 'string extensions to pascal case'

Database: professional_basketball
Question: Please list the birth date of the player who has won the most MVPs.
Evidence: won the most MVP refers to Max(Count(award = 'Most Valuable Player'))
SQL: SELECT T1.birthDate FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Most Valuable Player' GROUP BY T1.playerID, T1.birthDate ORDER BY COUNT(award) DESC LIMIT 1

Database: university
Question: What is the university ID of the university with the largest student staff ratio?
Evidence: the largest student staff ratio refers to max(student_staff_ratio)
SQL: SELECT university_id FROM university_year ORDER BY student_staff_ratio DESC LIMIT 1

Database: talkingdata
Question: How many female users use ZenFone 5 devices?
Evidence: female refers to gender = 'F'; ZenFone 5 refers to device_model = 'ZenFone 5';
SQL: SELECT COUNT(T1.gender) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T2.device_id = T1.device_id WHERE T1.gender = 'F' AND T2.device_model = 'ZenFone 5'

Database: retails
Question: Please list any three line item numbers that have 10% off.
Evidence: line item number refers to l_linenumber; 10% off refers to l_discount = 0.1
SQL: SELECT l_linenumber FROM lineitem WHERE l_discount = 0.1 LIMIT 3

Database: language_corpus
Question: Please list the titles of all the Wikipedia pages on the Catalan language with 10 different words.
Evidence: lid = 1 means it's Catalan language; 10 different words refers to words = 10; titles refers to title
SQL: SELECT title FROM pages WHERE lid = 1 AND words = 10 LIMIT 10

Database: sales
Question: How many customers share the most common last name?
Evidence: most common last name refers to MAX(COUNT(LastName));
SQL: SELECT COUNT(CustomerID) FROM Customers GROUP BY LastName ORDER BY COUNT(LastName) DESC LIMIT 1

Database: movie_3
Question: List down the films titles with the lowest replacement cost under the general audiences rating.
Evidence: lowest replacement cost refers to Min(replacement_cost); under general audience rating refers to rating = G
SQL: SELECT title FROM film WHERE replacement_cost = ( SELECT MIN(replacement_cost) FROM film )

Database: talkingdata
Question: For the event which happened at 14:09:49 on 2016/5/6, in the location coordinate(116, 40), how many apps were active?
Evidence: at 14:09:49 on 2016/5/6 refers to timestamp = '2016/5/6 14:09:49'; location coordinate(116, 40) refers to longitude = '116' AND latitude = '40'; active refers to is_active = '1';
SQL: SELECT COUNT(T1.app_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id WHERE T2.timestamp = '2016-05-06 14:09:49' AND T1.is_active = '1' AND T2.longitude = '116' AND T2.latitude = '40'

Database: retail_world
Question: What is the name of product with the ID of 77?
Evidence: name of product refers to ProductName; ID refers to ProductID
SQL: SELECT ProductName FROM Products WHERE ProductID = 77

Database: student_loan
Question: Calculate the ratio between unemployed students and disabled students.
Evidence: ratio refers to DIVIDE(COUNT(name from unemployed), COUNT(name from disabled))
SQL: SELECT CAST(( SELECT COUNT(name) FROM unemployed ) AS REAL ) / ( SELECT COUNT(name) FROM disabled )