Database: regional_sales
Question: Provide all the orders from WARE-NMK1003. Name the product and sales team for each of these order.
Evidence: all the orders from WARE-NMK1003 refer to OrderNumber where WarehouseCode = 'WARE-NMK1003'; product refers to Product Name;
SQL: SELECT DISTINCT T1.`Product Name`, T3.`Sales Team` FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Sales Team` AS T3 ON T3.SalesTeamID = T2._SalesTeamID WHERE T2.WarehouseCode = 'WARE-NMK1003'

Database: sales
Question: How many sales transactions were given by the customer named Joe L. Lopez?
Evidence: sales transactions refers to SalesID;
SQL: SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Joe' AND T2.MiddleInitial = 'L' AND T2.LastName = 'Lopez'

Database: public_review_platform
Question: List the business located in Mesa that have alcohol attribute.
Evidence: in Mesa refers to city = 'Mesa'; alcohol attribute refers to attribute_name = 'Alcohol'
SQL: SELECT T1.business_id FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T1.city = 'Mesa' AND T3.attribute_name = 'Alcohol'

Database: books
Question: How many customers have an address that is located in the city of Villeneuve-la-Garenne?
Evidence: "Villeneuve-la-Garenne" is the city
SQL: SELECT COUNT(address_id) FROM address WHERE city = 'Villeneuve-la-Garenne'

Database: cs_semester
Question: Give the student's last name that gave the highest student satisfaction for the course "Intro to Database 2".
Evidence: student's last name refers to l_name; satisfaction refers to sat; highest satisfaction refers to MAX(sat);
SQL: SELECT T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Intro to Database 2' ORDER BY T2.sat DESC LIMIT 1

Database: beer_factory
Question: Of the 4 root beers that Frank-Paul Santangelo purchased on 2014/7/7, how many of them were in cans?
Evidence: on 2014/7/7 refers to transactiondate = '2014-07-07'; in cans refers to containertype = 'Can';
SQL: SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeer AS T3 ON T2.RootBeerID = T3.RootBeerID WHERE T1.First = 'Frank-Paul' AND T1.Last = 'Santangelo' AND T2.TransactionDate = '2014-07-07' AND T3.ContainerType = 'Can'

Database: retail_world
Question: Give me the address, home phone and salary of the Sales Manager.
Evidence: "Sales Manage" is the Title
SQL: SELECT Address, HomePhone, Salary FROM Employees WHERE Title = 'Sales Manager'

Database: simpson_episodes
Question: What is the title of episode with 5 stars and nominated for Prism Award which is aired on April 19, 2009?
Evidence: 5 stars refers to stars = 5; nominated refers to result = 'Nominee'; Prism Award refers to award_category = 'Prism Award'; on April 19 2009 refers to air_date = '2009-04-19'
SQL: SELECT T3.title FROM Award AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Episode AS T3 ON T1.episode_id = T3.episode_id WHERE T3.air_date = '2009-04-19' AND T1.award_category = 'Prism Award' AND T2.stars = 5 AND T1.result = 'Nominee';

Database: retail_world
Question: What is the description of the category that tofu belongs to?
Evidence: tofu is the name of the product;
SQL: SELECT T1.Description FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.ProductName = 'tofu'

Database: trains
Question: What is the average number of cars on trains that run in the east direction?
Evidence: calculation = DIVIDE(count(id), count(train_id))
SQL: SELECT CAST(COUNT(T1.id) AS REAL) / COUNT(DISTINCT T1.train_id) FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T2.direction = 'east'

Database: talkingdata
Question: List at least 15 phone models released under the OPPO brand.
Evidence: phone models refers to device_model; OPPO brand refers to phone_brand = 'OPPO';
SQL: SELECT device_model FROM phone_brand_device_model2 WHERE phone_brand = 'OPPO' LIMIT 15

Database: language_corpus
Question: How many times did the word pair "i" and "a" appeared in the Cataln language/page?
Evidence: times appeared refers to occurrences; word pair "i" and "a" refers to w1st.word = 'i' w2st.word = 'a'
SQL: SELECT SUM(occurrences) FROM biwords WHERE w1st = 86 AND w2nd = 109

Database: app_store
Question: List down the rating for the App Learn C++.
Evidence: FALSE;
SQL: SELECT DISTINCT Rating FROM playstore WHERE App = 'Learn C++'

Database: book_publishing_company
Question: List the title, price and publication date for all sales with 'ON invoice' payment terms.
Evidence: publication date refers to pubdate; payment terms refers to payterms; payterms = 'ON invoice'
SQL: SELECT T2.title, T2.price, T2.pubdate FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id WHERE T1.payterms = 'ON invoice'

Database: airline
Question: Among the flights operated by American Airlines Inc., how many of them were scheduled to land in New York?
Evidence: American Airlines Inc. refers to Description = 'American Airlines Inc.: AA'; land in New York refers to DEST = 'JFK';
SQL: SELECT SUM(CASE WHEN T2.DEST = 'JFK' THEN 1 ELSE 0 END) AS count FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T3.Description = 'American Airlines Inc.: AA'

Database: cs_semester
Question: What is the phone number of Kerry Pryor?
SQL: SELECT phone_number FROM student WHERE l_name = 'Pryor' AND f_name = 'Kerry'

Database: cars
Question: How many models of Ford Maverick were produced?
Evidence: Ford Maverick refers to car_name = 'ford maverick'
SQL: SELECT COUNT(DISTINCT T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'ford maverick'

Database: address
Question: What is the code of the area with the largest Asian population?
Evidence: the code of the area refers to area_code; area with the largest Asian population refers to MAX(asian_population);
SQL: SELECT T1.zip_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.asian_population ORDER BY T2.asian_population DESC LIMIT 1

Database: college_completion
Question: What is the name of the school with the highest number of first-time, full-time, degree-seeking female students in the cohort being tracked, minus any exclusions who were seeking another type of degree or certificate at a 4-year institution?
Evidence: name of the school refers to chronname; highest number of first-time, full-time, degree-seeking female students in the cohort being tracked, minus any exclusions refers to MAX(grad_cohort WHERE gender = 'F'); seeking another type of degree or certificate at a 4-year institution refers to cohort = '4y other';
SQL: SELECT T1.chronname FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.gender = 'F' AND T2.cohort = '4y other' ORDER BY T2.grad_cohort DESC LIMIT 1

Database: movie_platform
Question: What are the top 5 most popular movies of the 21st century? Indicate how many users gave it a rating score of 5.
Evidence: most popular movies refers to MAX(movie_popularity); rating score of 5 refers to rating_score = 5; movies of the 21st century refers to movie_release_year> = 2000
SQL: SELECT DISTINCT T2.movie_id, SUM(T1.rating_score = 5) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T2.movie_popularity DESC LIMIT 5