Database: shakespeare
Question: How many paragraphs are there in the chapter with the highest amount of scenes in act 1?
Evidence: How many paragraphs refers to ParagraphNum; highest amount of scenes refers to max(count(Scene))
SQL: SELECT T1.ParagraphNum FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id WHERE T2.Act = 1 ORDER BY T2.Scene DESC LIMIT 1

Database: shipping
Question: What is the first name of the driver who transported shipment id 1028?
Evidence: shipment id 1028 refers to ship_id = 1028
SQL: SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_id = 1028

Database: world_development_indicators
Question: Which low income country has a series code of DT.DOD.DECT.CD? Name the country code of it.
Evidence: IncomeGroup = 'Low income';
SQL: SELECT T1.CountryCode FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.IncomeGroup = 'Low income' AND T2.Seriescode = 'DT.DOD.DECT.CD'

Database: computer_student
Question: How many non-faculty members are not undergoing the phase of qualifications?
Evidence: non-faculty members refers to hasPosition = 0; are not undergoing the phase of qualifications refers to inPhase = 0
SQL: SELECT COUNT(*) FROM person WHERE hasPosition = 0 AND inPhase = 0

Database: regional_sales
Question: How many orders made by Rochester Ltd?
Evidence: Rochester Ltd is the name of the customer; orders refer to OrderNumber;
SQL: SELECT SUM(CASE WHEN T1.`Customer Names` = 'Rochester Ltd' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID

Database: public_review_platform
Question: Identify the percent of long reviews among all 5-star reviews given to businesses by the Yelp users.
Evidence: percentage = divide(count(business_id where review_length = 'Long' and review_stars = 5), count(business_id)) * 100%; long reviews refers to review_length = 'Long'; 5-star review refers to review_stars = 5
SQL: SELECT CAST(SUM(CASE WHEN review_length = 'Long' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(review_length) FROM Reviews WHERE review_stars = 5

Database: food_inspection
Question: Between 2014 to 2016, what is the average inpsection score of the establishment owned by Yiu Tim Chan in 808 Pacific Ave, San Francisco?
Evidence: average inspection score refers to avg(score); establishment owned by Yiu Tim Chan refers to business_id where owner_name = 'Yiu Tim Chan'; Between 2014 to 2016 refers to year(date) between 2014 and 2016; address = '808 Pacific Ave'; city = 'San Francisco';
SQL: SELECT AVG(T1.score) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) BETWEEN '2014' AND '2016' AND T2.owner_name = 'Yiu Tim Chan' AND T2.address = '808 Pacific Ave' AND T2.city = 'San Francisco'

Database: olympics
Question: What is the NOC code of the region where the tallest male Olympic competitor is from?
Evidence: NOC code of the region refers to noc; male refers to gender = 'M'; the tallest refers to MAX(height);
SQL: SELECT T1.noc FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.gender = 'M' ORDER BY T3.height DESC LIMIT 1

Database: retail_complains
Question: Give me the social number and state of the client whose phone number is 100-121-8371.
Evidence: social number refers to social
SQL: SELECT T1.social, T1.state FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.phone = '100-121-8371'

Database: movie_platform
Question: How many followers does the list created by the user whose user_avatar_image_url is https://assets.mubicdn.net/images/avatars/74983/images-w150.jpg?1523895214 have?
Evidence: followers refers to list_followers;
SQL: SELECT SUM(T2.list_followers) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_avatar_image_url = 'https://assets.mubicdn.net/images/avatars/74983/images-w150.jpg?1523895214'

Database: talkingdata
Question: How many app IDs were included under science fiction category?
SQL: SELECT COUNT(T2.app_id) FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T2.label_id = T1.label_id WHERE T1.category = 'science fiction'

Database: video_games
Question: List down the platform IDs of the games released in 2007.
Evidence: released in 2007 refers to release_year = 2007;
SQL: SELECT DISTINCT T.platform_id FROM game_platform AS T WHERE T.release_year = 2007

Database: superstore
Question: What is the name of the corporate customer from Rhode Island who had the highest number of orders in 2016 from the east superstore?
Evidence: corporate customer refers to Segment = 'Corporate'; Rhode Island refers to State = 'Rhode Island'; in 2016 refers to "Order Date" BETWEEN '2016-01-01' AND '2016-12-31'; east superstore refers to Region = 'East'; highest number of orders refers to max(order_number); name of corporate customer refers to "Customer Name"
SQL: SELECT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.Segment = 'Corporate' AND T2.State = 'Rhode Island' AND T2.Region = 'East' AND STRFTIME('%Y', T1.`Order Date`) = '2016' GROUP BY T2.`Customer Name` ORDER BY COUNT(T2.`Customer Name`) DESC LIMIT 1

Database: retail_world
Question: Who are the suppliers of the discontinued products?
Evidence: discontinued product refers to Discontinued = 1; supplier refers to CompanyName
SQL: SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1

Database: music_platform_2
Question: Find the author, rating and review creation date of review for podcast title 'In The Thick'.
Evidence: "In The Thick" is the title of podcast; author refers to author_id; creation date refers to created_at
SQL: SELECT T2.author_id, T2.rating, T2.created_at FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'In The Thick' GROUP BY T2.author_id, T2.rating, T2.created_at

Database: retails
Question: Calculate the percentage of customers' accounts in debt.
Evidence: DIVIDE(COUNT(c_custkey where c_acctbal < 0), COUNT(c_custkey)) as percentage;
SQL: SELECT CAST(SUM(IIF(c_acctbal < 0, 1, 0)) AS REAL) * 100 / COUNT(c_custkey) FROM customer

Database: software_company
Question: Among the divorced male customers, give the income and response of those who has an level of education of 6 and above.
Evidence: divorced male customers refer to SEX = 'Male' where MARITAL_STATUS = 'Divorced';
SQL: SELECT DISTINCT T3.INCOME_K, T2.RESPONSE FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID INNER JOIN Demog AS T3 ON T1.GEOID = T3.GEOID WHERE T1.EDUCATIONNUM > 6 AND T1.SEX = 'Male' AND T1.MARITAL_STATUS = 'Divorced'

Database: retail_complains
Question: How many clients who live in New York City have the complaint outcome as "AGENT"?
Evidence: New York City refers to city = 'New York City'
SQL: SELECT COUNT(T2.`rand client`) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.city = 'New York City' AND T2.outcome = 'AGENT'

Database: university
Question: Give the name of the country that has the most universities.
Evidence: has the most universities refers to MAX(COUNT(id)); name of the country refers to country_name
SQL: SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id GROUP BY T2.country_name ORDER BY COUNT(T1.university_name) DESC LIMIT 1