Database: shakespeare
Question: What are the character names and descriptions of characters in "Venus and Adonis"?
Evidence: character names refers to CharName; "Venus and Adonis" refers to Title = 'Venus and Adonis'
SQL: SELECT DISTINCT T4.CharName, T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T1.Title = 'Venus and Adonis'

Database: image_and_language
Question: For those objects that have multiple relations, how many images have a prediction class of "reading"?
Evidence: prediction class of "reading" refers to PRED_CLASS = 'reading'; if two objects (OBJ1_SAMPLE_ID,
OBJ2_SAMPLE_ID) has
multiple PRED_CLASS_ID, it
means these two objects
have multiple relations;
SQL: SELECT COUNT(T1.IMG_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.PRED_CLASS = 'reading'

Database: menu
Question: Among the menus sponsored by Pacific Mail Steamship Company, how many menus have no more than 2 pages?
Evidence: sponsored by Pacific Mail Steamship Company refers to sponsor = 'PACIFIC MAIL STEAMSHIP COMPANY'; no more than 2 pages refers to COUNT(page_number) < = 2;
SQL: SELECT COUNT(*) FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T1.sponsor = 'PACIFIC MAIL STEAMSHIP COMPANY' GROUP BY T2.menu_id HAVING COUNT(T2.page_number) <= 2

Database: movie_platform
Question: What is the percentage of users gave "5" to the movie "Go Go Tales"?
Evidence: movie "Go Go Tales" refers to movie_title = 'Go Go Tales'; gave "5" refers to rating_score = 5; percentage refers to DIVIDE(COUNT(rating_score = 5),COUNT(rating_score))*100
SQL: SELECT CAST(SUM(CASE WHEN T1.rating_score = 5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'Go Go Tales'

Database: ice_hockey_draft
Question: How many players were born in 1982 and have a height above 182cm?
Evidence: born in 1982 refers to birthyear = 1982; height above 182cm refers to height_in_cm > 182 ;
SQL: SELECT COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T1.height_in_cm > 182 AND strftime('%Y', T2.birthdate) = '1982'

Database: disney
Question: Who is the hero character of the Disney movie directed by Will Finn?
Evidence: Will Finn refers to director = 'Will Finn';
SQL: SELECT T1.hero FROM characters AS T1 INNER JOIN director AS T2 ON T2.name = T1.movie_title WHERE T2.director = 'Will Finn'

Database: books
Question: What is the price of the book with ISBN 9780763628321?
Evidence: "9780763628321" is the isbn13
SQL: SELECT T2.price FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.isbn13 = 9780763628321

Database: mental_health_survey
Question: How many users participated in the Survey No.2016?
Evidence: Survey No.2016 refers to SurveyID = 2016
SQL: SELECT COUNT(DISTINCT UserID) FROM Answer WHERE SurveyID LIKE 2016

Database: movie_platform
Question: What is the user avatar url for user 41579158? What is the latest movie rated by him / her?
Evidence: user avatar url refers to user_avatar_image_url; latest movie rated refers to latest rating_date;
SQL: SELECT T3.user_avatar_image_url, T3.rating_date_utc FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id INNER JOIN ratings_users AS T3 ON T3.user_id = T2.user_id WHERE T3.user_id = 41579158 ORDER BY T3.rating_date_utc DESC LIMIT 1

Database: movie_platform
Question: Who is the user who created the list titled 'Sound and Vision'? Was he a subcriber when he created the list?
Evidence: list titled 'Sound and Vision' refers to list_title = 'Sound and Vision'; user_subscriber = 1 means the user was a subscriber when he rated the movie; user_subscriber = 0 means the user was not a subscriber when he rated the movie




SQL: SELECT T1.user_id, T1.user_subscriber FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_title LIKE 'Sound and Vision'

Database: talkingdata
Question: Which brand is most common among people in their twenties?
Evidence: brand refers to phone_brand; brand that is most common refers to MAX(COUNT(phone_brand)); twenties refers to age BETWEEN 20 AND 30;
SQL: SELECT T.phone_brand FROM ( SELECT T2.phone_brand, COUNT(T2.phone_brand) AS num FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.age BETWEEN 20 AND 30 GROUP BY T2.phone_brand ) AS T ORDER BY T.num DESC LIMIT 1

Database: retails
Question: List the phone numbers of customers whose order priority is urgent.
Evidence: phone number refers to c_phone; order priority is urgent refers to o_orderpriority = '1-URGENT'
SQL: SELECT T2.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderpriority = '1-URGENT'

Database: car_retails
Question: Please calculate the average total price of orders from Exoto Designs Vendor in 2005.
Evidence: average total price = DIVIDE(SUM(MULTIPLY(quantityOrdered, priceEach))), COUNT(orderNumber)); year(orderDate) = '2005';
SQL: SELECT SUM(T2.quantityOrdered * T2.priceEach) / COUNT(T3.orderNumber) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode INNER JOIN orders AS T3 ON T2.orderNumber = T3.orderNumber WHERE T1.productVendor = 'Exoto Designs' AND STRFTIME('%Y', T3.orderDate) = '2005'

Database: software_company
Question: Among the male customers, how many of them come from a place with over 30,000 inhabitants?
Evidence: SEX = 'Male', over 30,000 inhabitants refer to NHABITANTS_K > 30; place refers to GEOID;
SQL: SELECT COUNT(T1.GEOID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.SEX = 'Male' AND T2.INHABITANTS_K > 30

Database: cars
Question: Provide the name and model of the car with the highest price.
Evidence: car's name refers to car_name; the highest price refers to max(price)
SQL: SELECT T1.car_name, T1.model FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1

Database: language_corpus
Question: Please list the titles of the top 3 Wikipedia pages with the most different words on the Catalan language.
Evidence: lid = 1 means it's Catalan language; with most different words refers to MAX(words)
SQL: SELECT title FROM pages WHERE lid = 1 ORDER BY words DESC LIMIT 3

Database: restaurant
Question: List all of the restaurant addresses from an unknown region.
Evidence: restaurant address refers to street_num, street_name; unknown region refers to region = 'unknown'
SQL: SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.region = 'unknown'

Database: student_loan
Question: Define the gender of "student995" and his/her enrolled schools.
Evidence: male.name = 'student995' means student995's gender is male; if 'student995' can not be found in 'male.name', it means student995 is female;
SQL: SELECT IIF(T2.name IS NULL, 'female', 'male') AS gen , T1.school FROM enrolled AS T1 LEFT JOIN male AS T2 ON T2.name = T1.name WHERE T1.name = 'student995'

Database: world
Question: Provide the name, located country, and life expectancy of the most populated city
Evidence: most populated city refers to MAX(Population);
SQL: SELECT T2.Name, T1.Code, T1.LifeExpectancy FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T2.Population DESC LIMIT 1

Database: talkingdata
Question: Please list the ages of all the users who use a Galaxy Note 2.
Evidence: Galaxy Note 2 refers to device_model = 'Galaxy Note 2';
SQL: SELECT T2.age FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.device_model = 'Galaxy Note 2'