Database: retail_complains
Question: What is the full address of the customers who, having received a timely response from the company, have dispute about that response?
Evidence: full address = address_1, address_2; received a timely response refers to Timely response? = 'Yes'; have dispute refers to "Consumer disputed?" = 'Yes';
SQL: SELECT T1.address_1, T1.address_2 FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'Yes' AND T2.`Consumer disputed?` = 'Yes'

Database: superstore
Question: Name the customers from the Eastern region whose orders cost above 80000.
Evidence: cost above 80000 refers to SUTRACT(MULTIPLY(DIVIDE(Sales, SUTRACT(1, discount)), Quantity), Profit) > 80000
SQL: SELECT DISTINCT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'East' AND T1.Sales / (1 - T1.Discount) * T1.Quantity - T1.Profit > 80000

Database: movie_3
Question: How much money did the customer No.297 pay for the rental which happened at 12:27:27 on 2005/7/28?
Evidence: customer no. 297 refers to customer_id = 297; at 12:27:27 on 2005/7/28 refers to rental_date = '2005-07-28 12:27:27'; money pay for rent refers to amount
SQL: SELECT T1.amount FROM payment AS T1 INNER JOIN rental AS T2 ON T1.rental_id = T2.rental_id WHERE T2.rental_date = '2005-07-28 12:27:27' AND T2.customer_id = 297

Database: car_retails
Question: Which product did Cruz & Sons Co. order on 2003/3/3?
Evidence: Cruz & Sons Co. is name of customer; 2003/3/3 refers to orderDate;
SQL: SELECT t4.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber INNER JOIN products AS t4 ON t1.productCode = t4.productCode WHERE t3.customerName = 'Cruz & Sons Co.' AND t2.orderDate = '2003-03-03'

Database: app_store
Question: How many apps were last updated in January of 2018? Please write one translated review with positive sentiment for each app, if there's any.
Evidence: updated in January of 2018 refers to Last Updated BETWEEN 'January 1, 2018' and 'January 31, 2018';
SQL: SELECT DISTINCT Translated_Review FROM user_reviews WHERE App IN ( SELECT App FROM playstore WHERE `Last Updated` BETWEEN 'January 1, 2018' AND 'January 31, 2018' ) AND Sentiment = 'Positive'

Database: retail_world
Question: Among the customers, list customers' company names and addresses who paid more than average in freight.
Evidence: paid more than average in freight refers to Freight > divide(sum(Freight) , count(OrderID))
SQL: SELECT DISTINCT T1.CompanyName, T1.Address FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Freight > ( SELECT AVG(Freight) FROM Orders )

Database: chicago_crime
Question: How many domestic violence cases were brought in the ward that uses "ward13@cityofchicago.org"?
Evidence: domestic violence refers to domestic = 'TRUE'; uses "ward13@cityofchicago.org" refers to ward_email = 'ward13@cityofchicago.org'
SQL: SELECT SUM(CASE WHEN T2.domestic = 'TRUE' THEN 1 ELSE 0 END) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T2.ward_no = T1.ward_no WHERE T1.ward_email = 'ward13@cityofchicago.org'

Database: restaurant
Question: Please list any five cities that have an unidentified county and region.
Evidence: unidentified county and region refers to county = 'unknown' AND region = 'unknown'
SQL: SELECT city FROM geographic WHERE county = 'unknown' AND region = 'unknown' LIMIT 5

Database: bike_share_1
Question: How many stations were installed on the date of 8/16/2013 and how many users on those stations are classified as a customer?
Evidence: installed on refers to installation_date; installation_date = '8/16/2013'; customers refers to subscription_type = customers;
SQL: SELECT COUNT(T1.name) , SUM(CASE WHEN T2.subscription_type = 'Customer' THEN 1 ELSE 0 END) FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name WHERE T1.installation_date = '8/16/2013' AND T2.subscription_type = 'Customer'

Database: public_review_platform
Question: What is the longest business time on Mondays for a Yelp_Business under the category "Shopping"?
Evidence: longest business time refers to max(subtract(closing_time, opening_time)); on Mondays refers to day_of_week = 'Monday';  category "Shopping" refers to category_name = 'Shopping'
SQL: SELECT T1.closing_time + 12 - T1.opening_time AS "hour" FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id INNER JOIN Business_Categories AS T4 ON T3.business_id = T4.business_id INNER JOIN Categories AS T5 ON T4.category_id = T5.category_id WHERE T2.day_of_week LIKE 'Monday' AND T5.category_name LIKE 'Shopping' ORDER BY T1.closing_time + 12 - T1.opening_time DESC LIMIT 1

Database: book_publishing_company
Question: Provide a list of titles together with its publisher name for all publishers located in the USA.
Evidence: publisher name refers to pub_name;
SQL: SELECT T1.title, T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country = 'USA'

Database: airline
Question: Provide the destinations of flight number 1596.
Evidence: destination refers to DEST; flight number refers to OP_CARRIER_FL_NUM; OP_CARRIER_FL_NUM = 1596;
SQL: SELECT DEST FROM Airlines WHERE OP_CARRIER_FL_NUM = 1596

Database: olympics
Question: Among the competitors of the 1994 Winter Olympic Game, what is the percentage of those from Finland?
Evidence: DIVIDE(COUNT(id where region_name = 'Finland'), COUNT(id)) as percentage where games_name = '1994 Winter';
SQL: SELECT CAST(COUNT(CASE WHEN T5.region_name = 'Finland' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T3.id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id INNER JOIN person_region AS T4 ON T3.id = T4.person_id INNER JOIN noc_region AS T5 ON T4.region_id = T5.id WHERE T1.games_name = '1994 Winter'

Database: authors
Question: List author name for articles that are preprinted but not published.
Evidence: articles that are preprinted but not published refers to Year = 0
SQL: SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Year = 0

Database: software_company
Question: Among the customers over 30, how many of them are Machine-op-inspcts?
Evidence: over 30 refers to age > 30; OCCUPATION = 'Machine-op-inspct';
SQL: SELECT COUNT(ID) FROM Customers WHERE OCCUPATION = 'Machine-op-inspct' AND age > 30

Database: synthea
Question: Give the procedure description of Ms. Jacquelyn Shanahan on 2009/8/9.
Evidence: on 2009/8/9 refers to DATE = '2009-08-09';
SQL: SELECT DISTINCT T2.description FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Jacquelyn' AND T1.last = 'Shanahan' AND T2.DATE = '2009-08-09'

Database: olympics
Question: How many competitors over the age of 30 participated in the 1992 Winter Olympics?
Evidence: competitors over the age of 30 refer to person_id where age > 30; the 1992 Winter Olympics refers to games_name = '1992 Winter';
SQL: SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '1992 Winter' AND T2.age > 30

Database: student_loan
Question: How many disabled students have payment due?
Evidence: have payment due refers to bool = 'pos';
SQL: SELECT COUNT(T1.name) FROM disabled AS T1 INNER JOIN no_payment_due AS T2 ON T2.name = T1.name WHERE T2.bool = 'pos'