Database: disney
Question: Find out what proportion of total revenue Walt Disney Parks and Resorts received in 2010.
Evidence: DIVIDE(Walt Disney Parks and Resorts where year = 2010), SUM(year = 2010) as percentage;
SQL: SELECT SUM(`Walt Disney Parks and Resorts`) / SUM(Total) * 100 FROM revenue WHERE year = 2010

Database: retail_world
Question: Identify the customer, which placed the largest order in terms of value.
Evidence: value refers to SUM(UnitPrice * Quantity * SUBTRACT(1, Discount)); the largest order in value refers to MAX(value)
SQL: SELECT T1.CompanyName 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 GROUP BY T2.CustomerID ORDER BY SUM(T3.UnitPrice * T3.Quantity * (1 - T3.Discount)) DESC LIMIT 1

Database: shipping
Question: How many shipments were delivered to a customer from New York?
Evidence: "New York" refers to state = 'NY'
SQL: SELECT COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state = 'NY'

Database: regional_sales
Question: Describe the customer names and product names which had over 3800 USD in net profit.
Evidence: over 3800 USD in net profit refers to SUBTRACT(Unit Price, Unit Cost) where Net Profit > 3800;
SQL: SELECT DISTINCT `Customer Names`, `Product Name` FROM ( SELECT T1.`Customer Names`, T3.`Product Name` , REPLACE(T2.`Unit Price`, ',', '') - REPLACE(T2.`Unit Cost`, ',', '') AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products T3 ON T3.ProductID = T2._ProductID ) WHERE T > 3800

Database: university
Question: What are the top three universities with the most international students?
Evidence: most international students refers to MAX(SUM(DIVIDE(MULTIPLE(pct_international_students, num_students), 100))); name of university refers to university_name;
SQL: SELECT DISTINCT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id GROUP BY T2.university_name ORDER BY SUM(T1.num_students * T1.pct_international_students / 100) DESC LIMIT 3

Database: cs_semester
Question: Among undergraduate students, list the name of the course with the highest student satisfaction.
Evidence: Undergraduate students refers to type = 'UG'; satisfaction refers to sat; highest satisfaction refers to MAX(sat);
SQL: SELECT T3.name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.type = 'UG' ORDER BY T2.sat DESC LIMIT 1

Database: music_platform_2
Question: What is the category and itune url of the title "Scaling Global"?
SQL: SELECT T1.category, T2.itunes_url FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'Scaling Global'

Database: shipping
Question: Among the shipments delivered by Maria Craft, how many shipments were delivered in 2017?
Evidence: delivered in 2017 refers to Cast(ship_date AS DATE) = 2017
SQL: SELECT COUNT(*) FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Maria' AND T2.last_name = 'Craft' AND STRFTIME('%Y', T1.ship_date) = '2017'

Database: genes
Question: Lists all genes by identifier number located in the cytoplasm and whose function is metabolism.
SQL: SELECT DISTINCT GeneID FROM Genes WHERE Localization = 'cytoplasm' AND Function = 'METABOLISM'

Database: language_corpus
Question: What is the word that occurs the most in the Catalan language?
Evidence: MAX(occurrences)
SQL: SELECT word FROM words WHERE occurrences = ( SELECT MAX(occurrences) FROM words )

Database: books
Question: Which customer has the most addresses?
Evidence: customer refers to first_name, last_name; the most address refers to Max(count(address_id))
SQL: SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.first_name, T1.last_name ORDER BY COUNT(T2.customer_id) DESC LIMIT 1

Database: codebase_comments
Question: Among all the solution of the 'zh-cn' methods, which path is most often used?
Evidence: solution refers to SolutionId; zh-cn refers to Lang = 'zh-cn'; path that is most often used refers to MAX(COUNT(Path));
SQL: SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Lang = 'zh-cn' GROUP BY T1.Path ORDER BY COUNT(T1.Path) DESC LIMIT 1

Database: regional_sales
Question: State all the order numbers for sales team of Samuel Fowler.
SQL: SELECT T FROM ( SELECT DISTINCT CASE  WHEN T2.`Sales Team` = 'Samuel Fowler' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team` T2 ON T2.SalesTeamID = T1._SalesTeamID ) WHERE T IS NOT NULL

Database: movies_4
Question: What is the most common first name?
Evidence: most common first name refers to max(count(person_name))
SQL: SELECT person_name FROM person GROUP BY person_name ORDER BY COUNT(person_name) DESC LIMIT 1

Database: language_corpus
Question: List out the total pages of the words that has repeated times more than 3000.
Evidence: repeated more than 3000 times refers to occurrences > 3000;
SQL: SELECT T1.pages FROM langs AS T1 INNER JOIN langs_words AS T2 ON T1.lid = T2.lid WHERE T2.occurrences > 3000 GROUP BY T1.pages

Database: student_loan
Question: List any ten male students who enlisted for foreign legion.
Evidence: male students are mentioned in male.name; foreign legion refers to organ = 'foreign_legion';
SQL: SELECT T1.name FROM enlist AS T1 INNER JOIN male AS T2 ON T2.name = T1.name WHERE T1.organ = 'foreign_legion' LIMIT 10

Database: legislator
Question: What is the total number of legislators with "John" as their first name?
SQL: SELECT COUNT(*) FROM current WHERE first_name = 'John'

Database: talkingdata
Question: How many men under the age of 23 have apps installed but are not active on their devices?
Evidence: men refers to gender = 'M'; under the age of 23 refers to age < 23; installed refers to is_installed = 1; not active refers to is_active = 0;
SQL: SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id INNER JOIN app_events_relevant AS T3 ON T2.event_id = T3.event_id WHERE T1.gender = 'M' AND T3.is_active = 0 AND T1.age < 23

Database: coinmarketcap
Question: Name the coin with the highest percentage price changed in 24 hours. State the transaction date and price.
Evidence: the highest percentage price changed in 24 hours refers to max(percent_change_24h)
SQL: SELECT T1.name, T2.DATE, T2.price FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.percent_change_24h = ( SELECT MAX(percent_change_24h) FROM historical )

Database: synthea
Question: How many of the male patients are allergic to house dust mites?
Evidence: male patients refer to PATIENT where gender = 'M'; allergic to house dust mites refers to allergies where DESCRIPTION = 'House dust mite allergy';
SQL: SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'House dust mite allergy' AND T1.gender = 'M'