Database: authors
Question: How many papers were published in 2011 in the journal whose short name is "Mol Brain"?
Evidence: in 2011 refers to Year = 2011; 'Mol Brain' is the ShortName of journal
SQL: SELECT COUNT(T2.Id) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T2.Year = 2011 AND T1.ShortName = 'Mol Brain'

Database: computer_student
Question: What level is course 165? List the professors who teach the course.
Evidence: course 165 refers to course_id = 165; professors refers to taughtBy.p_id
SQL: SELECT T1.courseLevel, T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.course_id = 165

Database: image_and_language
Question: Give the bounding box of the kite in image no.2324765.
Evidence: bounding box refers to (x, y, W, H); kite refers to OBJ_CLASS = 'kite'; image no.2324765 refers to IMG_ID = 2324765
SQL: SELECT T2.X, T2.Y, T2.W, T2.H FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 2324765 AND T1.OBJ_CLASS = 'kite'

Database: books
Question: Which book has the most number of pages?
Evidence: books with the most number of pages refers to Max(num_pages)
SQL: SELECT title FROM book ORDER BY num_pages DESC LIMIT 1

Database: simpson_episodes
Question: List down person's name who has nickname.
Evidence: has nickname refers to nickname is NOT NULL
SQL: SELECT name FROM Person WHERE nickname IS NOT NULL;

Database: public_review_platform
Question: Write down the ID, active status and city of the business which are in CA state.
Evidence: the ID refers to business_id; active status refers to active; active = 'true' means the business is still running; active = 'false' means the business is closed or not running now
SQL: SELECT business_id, active, city FROM Business WHERE state = 'CA' AND active = 'true'

Database: world
Question: List the languages used in Turkmenistan.
Evidence: Turkmenistan is a name of country;
SQL: SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Turkmenistan'

Database: address
Question: What are the zip code for the Senate house?
Evidence: House of Repsentatives can stand for senate house
SQL: SELECT T2.zip_code FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.House = 'House of Repsentatives' GROUP BY T2.zip_code

Database: disney
Question: How many movies did Wolfgang Reitherman direct?
Evidence: Wolfgang Reitherman refers director = 'Wolfgang Reitherman';
SQL: SELECT COUNT(name) FROM director WHERE director = 'Wolfgang Reitherman'

Database: restaurant
Question: What types of food are served at the 4 top-reviewed restaurants?
Evidence: top-reviewed refers to review = 4; type of food refers to food_type


SQL: SELECT food_type FROM generalinfo WHERE review = ( SELECT MAX(review) FROM generalinfo ) LIMIT 4

Database: car_retails
Question: What is the average, highest and lowest annual payments collected between 1/1/2003 to 12/31/2005?
Evidence: paymentDate BETWEEN '2003-01-01' AND '2005-12-31'; average annual payments = DIVIDE(SUM(amount), 3);
SQL: SELECT CAST(SUM(T1.amount) AS REAL) / 3, MAX(T1.amount) , MIN(T1.amount) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.paymentDate BETWEEN '2003-01-01' AND '2005-12-31'

Database: restaurant
Question: What are the regions with Greek restaurants?
Evidence: Greek restaurant refers to food_type = 'greek'
SQL: SELECT DISTINCT T1.region FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'greek'

Database: soccer_2016
Question: Give the name of the striker in the match no. 419169, over no.3, ball no.2, inning no.2.
Evidence: name of the striker refers to Player_Name; match no. 419169 refers to Match_Id = 419169; over no.3 refers to Over_Id = 3; ball no.2 refers to Ball_Id = 2; inning no.2 refers to Innings_No = 2
SQL: SELECT T2.Player_Name FROM Ball_by_Ball AS T1 INNER JOIN Player AS T2 ON T1.Striker = T2.Player_Id WHERE T1.Match_Id = 419169 AND T1.Over_Id = 3 AND T1.Ball_Id = 2 AND T1.Innings_No = 2

Database: retail_world
Question: What is the shipping company for order number 10558?
Evidence: order number 10558 refers to OrderID = 10558;
SQL: SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10558

Database: public_review_platform
Question: How many businesses are there in Phoenix city? Find the percentage of businesses in Phoenix city in the total city.
Evidence: percentage = MULTIPLY(DIVIDE(SUM(city = 'Phoenix' END), COUNT(category_id)), 1.0);
SQL: SELECT SUM(CASE WHEN T3.city LIKE 'Phoenix' THEN 1 ELSE 0 END) AS "num" , CAST(SUM(CASE WHEN T3.city LIKE 'Phoenix' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.city) FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id

Database: movie_3
Question: Which category is the film "Beach Heartbreakers" falls into?
Evidence: category refers to name; film "Beach Heartbreakers" refers to title = 'BEACH HEARTBREAKERS'
SQL: SELECT T3.name FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T1.title = 'BEACH HEARTBREAKERS'

Database: movie_platform
Question: What is the average number of movies added to the lists of user 8516503? Give the user profile image URL on Mubi.
Evidence: user profile image URL refers to user_avatar_image_url; user 8516503 refers to user_id; Average refers to AVG(list_movie_number where user_id = 8516503)


SQL: SELECT AVG(T1.list_movie_number), T2.user_avatar_image_url FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T2.user_id = 8516503

Database: chicago_crime
Question: List the name and population of the communities where more than average solicit for prostitutes were reported.
Evidence: "SOLICIT FOR PROSTITUTE" is the secondary_description; more than average refers to count(iucr_no) > Divide (Count(secondary_description = 'SOLICIT FOR PROSTITUTE'), Count(iucr_no)); name of community refers to community_area_name
SQL: SELECT T2.community_area_name, T2.population FROM Crime AS T1 INNER JOIN Community_Area AS T2 ON T2.community_area_no = T1.community_area_no INNER JOIN IUCR AS T3 ON T3.iucr_no = T1.iucr_no WHERE T3.iucr_no = ( SELECT iucr_no FROM IUCR WHERE secondary_description = 'SOLICIT FOR PROSTITUTE' GROUP BY iucr_no HAVING COUNT(iucr_no) > ( SELECT SUM(CASE WHEN secondary_description = 'SOLICIT FOR PROSTITUTE' THEN 1.0 ELSE 0 END) / COUNT(iucr_no) AS average FROM IUCR ) )

Database: public_review_platform
Question: Write the user ID, business ID and tips length of who started using Yelp since 2004 and had high followers.
Evidence: started using Yelp since 2004 refers to user_yelping_since_year = '2004'; had high followers refers to user_fans = 'High'
SQL: SELECT T1.user_id, T2.business_id, T2.tip_length FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = 2004 AND T1.user_fans = 'High'

Database: college_completion
Question: Provide the institute name with less than 200 graduate cohort of all races and genders in 2013. Also, please state the total number of full-time equivalent undergraduates for the institute.
Evidence: institute name refers to chronname; less than 200 graduate cohort refers to grad_cohort < 200; all races refers to race = 'X'; all genders refers to gender = 'B'; in 2013 refers to year = 2013; total number of full-time equivalent undergraduates refers to fte_value;
SQL: SELECT T1.chronname, T2.grad_cohort FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T2.year = 2013 AND T2.gender = 'B' AND T2.race = 'X' AND T2.grad_cohort < 200