Database: authors
Question: Among author ID of under 1000, who published the paper in affiliation with Zurich, ETH, provide paper ID, year and keyword if any.
Evidence: author ID of under 100 refers to AuthorId < 100; 'Zurich, ETH' is the Affiliation
SQL: SELECT T2.Id, T2.Year, T2.Keyword FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.AuthorId < 1000 AND T1.Affiliation = 'Zurich, ETH'

Database: simpson_episodes
Question: Who is the writer for the episode with the most 10 star votes?
Evidence: writer refers to role = 'Writer'; most 10 star votes refers to max(votes) where stars = 10
SQL: SELECT T1.person FROM Credit AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T1.role = 'Writer' AND T2.stars = 10 GROUP BY T1.person ORDER BY COUNT(*) DESC LIMIT 1;

Database: sales
Question: Count the total quantity for sales from id 1 to 10.
Evidence: sales from id 1 to 10 refers to SalesID BETWEEN 1 AND 10;
SQL: SELECT SUM(Quantity) FROM Sales WHERE SalesID BETWEEN 1 AND 10

Database: chicago_crime
Question: What is the weekly average number of fraud incidents that were reported in January 2018? Provide the description of the location where the majority of fraud incidents occurred in the said month.
Evidence: fraud incident refers to title = 'Fraud'; reported in January 2018 refers to Substr(date, 1, 1) = '1' AND Substr(date, 5, 4) = '2018'; description of location refers to location_description; weekly average refers to Divide (Count(report_no), 4); majority of incidents occurred refers to Max(Count(location_description))
SQL: SELECT CAST(COUNT(T1.fbi_code_no) AS REAL) / 4 FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE SUBSTR(T2.date, 1, 1) = '1' AND SUBSTR(T2.date, 5, 4) = '2018'

Database: regional_sales
Question: How many online purchases did Ole Group make in May 2019?
Evidence: "Ole Group" is the Customer Names; online purchase refers to Sales Channel = 'Online'; made in May 2019 refers to OrderDate LIKE '5/%/19'
SQL: SELECT SUM(CASE WHEN T1.`Sales Channel` = 'Online' AND T2.`Customer Names` = 'Ole Group' AND T1.OrderDate LIKE '5/%/19' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID

Database: books
Question: List the ISBN of the books that cost 7.5 dollars.
Evidence: ISBN refers to isbn13; books cost 7.5 dollars refers to price = 7.5
SQL: SELECT T1.isbn13 FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T2.price = 7.5

Database: food_inspection
Question: What is the average score of the establishments owned by the owner with the highest number of establishments?
Evidence: average score refers avg(score); owner with the highest number of establishments refers to owner_name where MAX(COUNT(business_id));
SQL: SELECT AVG(T1.score) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id GROUP BY T2.owner_name ORDER BY COUNT(T2.business_id) DESC LIMIT 1

Database: movie
Question: Among the actors born in New York City, list the genre of their movie with a rating greater than 5.
Evidence: born in New York City refers to Birth City = 'New York City'; rating greater than 5 refers to Rating > 5
SQL: SELECT T1.Genre FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T3.`Birth City` = 'New York City' AND T1.Rating > 5

Database: image_and_language
Question: What is the relationship between "feathers" and "onion" in image no.2345528?
Evidence: relationship refers to PRED_CLASS; "feathers" and "onion" in image no.2345528 refers to IMG_ID = 2345528 and OBJ_CLASS = 'feathers' and OBJ_CLASS = 'onion'
SQL: SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.OBJ1_SAMPLE_ID = T3.OBJ_SAMPLE_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE (T4.OBJ_CLASS = 'feathers' OR T4.OBJ_CLASS = 'onion') AND T2.IMG_ID = 2345528 GROUP BY T1.PRED_CLASS

Database: books
Question: Provide the contact email of Moss Zarb.
SQL: SELECT email FROM customer WHERE first_name = 'Moss' AND last_name = 'Zarb'

Database: retail_world
Question: Find the total payment of the orders by customers from San Francisco.
Evidence: from San Francisco refers to City = 'San Francisco'; total payment refers to sum(MULTIPLY(UnitPrice, Quantity, SUBTRACT(1, Discount)))
SQL: SELECT SUM(T3.UnitPrice * T3.Quantity * (1 - T3.Discount)) AS TOTALPAYMENT FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID WHERE T1.City = 'San Francisco'

Database: olympics
Question: List out years that only have summer games.
Evidence: years refer to games_year; only have summer games refer to games_year where COUNT(games_name) = 1 and season = 'Summer';
SQL: SELECT games_year FROM games WHERE season != 'Winter' GROUP BY games_year HAVING COUNT(season) = 1

Database: public_review_platform
Question: What is the total number of fans or followers who received most likes of their comments in the business?
Evidence: fans and followers refers to user_fans; most likes of their comments refer to Max(likes)
SQL: SELECT COUNT(T1.user_fans) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id ORDER BY COUNT(T2.likes) DESC LIMIT 1

Database: superstore
Question: Among the customers from Chicago, Illinois, what is the highest quantity of products bought in a single order?
Evidence: from Chicago refers to City = 'Chicago'; Illinois refers to State = 'Illinois'; highest quantity refers to max(Quantity)
SQL: SELECT T1.Quantity FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN central_superstore AS T3 ON T3.`Customer ID` = T2.`Customer ID` INNER JOIN south_superstore AS T4 ON T4.`Customer ID` = T3.`Customer ID` INNER JOIN people AS T5 ON T5.`Customer ID` = T4.`Customer ID` WHERE T5.City = 'Chicago' AND T5.State = 'Illinois' ORDER BY T1.Quantity DESC LIMIT 1

Database: law_episode
Question: Who was nominated for award no.313? Give the full name.
Evidence: award no.313 refers to award_id = '313'; full name refers to name
SQL: SELECT T1.name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.award_id = 313

Database: superstore
Question: How many of the "Hon Pagoda Stacking Chairs" have been sold in total in the west superstore?
Evidence: Hon Pagoda Stacking Chairs' is the "Product Name"; west superstore refers to Region = 'West'
SQL: SELECT SUM(T1.Quantity) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Hon Pagoda Stacking Chairs'

Database: public_review_platform
Question: List out which business category that are most likely to have average good review in Arizona?
Evidence: average good review refers to review_count > = 3; Arizona refers to state = 'AZ'; business category refers to category_name
SQL: SELECT DISTINCT T4.category_name FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T2.state LIKE 'AZ' AND T1.review_stars >= 3

Database: public_review_platform
Question: Calculate the yearly average user who started using Yelp from the year of 2005 to 2014.
Evidence: avg(user_id) where user_yelping_since_year BETWEEN '2005' AND '2014';
SQL: SELECT AVG(user_id) FROM Users WHERE user_yelping_since_year >= 2005 AND user_yelping_since_year <= 2015