Database: airline
Question: List the description of the airports that have code that ends with number 3?
Evidence: code that ends with number 3 refers to Code like '%3';
SQL: SELECT Description FROM Airports WHERE Code LIKE '%3'

Database: legislator
Question: What is the contact URL of Claire McCaskill?
Evidence: contact URL refers to contact_form; Claire McCaskill is an official_full_name
SQL: SELECT T2.contact_form FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Claire McCaskill' GROUP BY T2.contact_form

Database: superstore
Question: What was the original price of Xerox 1952 ordered by Aimee Bixby on 2014/9/10?
Evidence: Xerox 1952 is a "Product Name"; ordered by Aimee Bixby refers to "Customer Name" = 'Aimee Bixby'; on 2014/9/10 refers to "Order Date" = date('2014-09-10'); original price refers to DIVIDE(Sales, SUTRACT(1, discount))
SQL: SELECT DISTINCT T2.Sales / (1 - T2.Discount) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Aimee Bixby' AND T3.`Product Name` = 'Xerox 1952' AND T2.`Order Date` = '2014-09-10'

Database: legislator
Question: Does Thomas Carnes have an account on ballotpedia.org?
Evidence: if first_name = 'Thomas' and last_name = 'Carnes' AND ballotpedia_id is null then Thomas Carnes doesn't have an account on ballotpedia.org; if first_name = 'Thomas' and last_name = 'Carnes' AND ballotpedia_id is NOT null then Thomas Carnes have an account on ballotpedia.org;
SQL: SELECT CASE WHEN ballotpedia_id IS NULL THEN 'doesn''t have' ELSE 'have' END AS HaveorNot FROM historical WHERE first_name = 'Thomas' AND last_name = 'Carnes'

Database: student_loan
Question: State name of students who have the longest duration of absense from school and do not have payment due.
Evidence: longest duration of absence from school refers to MAX(month); do not have payment due refers to bool = 'neg';
SQL: SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'neg' ORDER BY T1.month DESC LIMIT 1

Database: menu
Question: To which menu does the menu page image ID5189412 belong? Please give its name.
Evidence: FALSE;
SQL: SELECT T1.name FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.image_id = 5189412

Database: cs_semester
Question: How many students got an A in Applied Deep Learning?
Evidence: A refers to an excellent grade in which grade = 'A' for the course;
SQL: SELECT COUNT(T2.student_id) FROM course AS T1 INNER JOIN registration AS T2 ON T1.course_id = T2.course_id WHERE T2.grade = 'A' AND T1.name = 'Applied Deep Learning '

Database: movies_4
Question: List down the IDs of the production companies that released the movies in 1916.
Evidence: IDs of the production companies refers to company_id; movies in 1916 refers to release_date LIKE '1916%'
SQL: SELECT T2.company_id FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id WHERE CAST(STRFTIME('%Y', T1.release_date) AS INT) = 1916

Database: movies_4
Question: List the job titles of Sally Menke in the crew.
Evidence: job titles refers to job
SQL: SELECT DISTINCT T2.job FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Sally Menke'

Database: food_inspection
Question: List the violation type ID of business with business ID from 30 to 50 and located at 747 IRVING St, San Francisco.
Evidence: business ID from 30 to 50 refers to business_id between 30 and 50; address = '747 IRVING St'; city = 'San Francisco';
SQL: SELECT DISTINCT T1.violation_type_id FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.business_id BETWEEN 30 AND 50 AND T2.address = '747 IRVING St' AND T2.city = 'San Francisco'

Database: movie_platform
Question: How many users liked the movie "A Way of Life" to the highest extent?
Evidence: like the movie highest to the extent refers to rating_score = 5; A Way of Life refers to movie_title;
SQL: SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life' AND T1.rating_score = 5

Database: regional_sales
Question: List out the name of orders which have delivery date of 6/13/2018.
SQL: SELECT DISTINCT T FROM ( SELECT IIF(DeliveryDate = '6/13/18', OrderNumber, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL

Database: sales
Question: Find and list the full name of customers who bought products above-average quantity.
Evidence: full name of the customer = FirstName, MiddleInitial, LastName; above-average quantity = Quantity > AVG(Quantity);
SQL: SELECT T2.FirstName, T2.MiddleInitial, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T1.Quantity HAVING T1.Quantity > ( SELECT AVG(Quantity) FROM Sales )

Database: car_retails
Question: Please calculate the total payment amount of customers who come from the USA.
Evidence: USA is a country; total amount payment refers to SUM(amount);
SQL: SELECT SUM(T1.amount) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T2.country = 'USA'

Database: retail_complains
Question: In reviews of product with 5 stars, what is the percentage of the reviews coming from the division of East North Central?
Evidence: 5 stars refers to Stars = 5; percentage = divide(count(division = 'East North Central', count(division)) * 100%
SQL: SELECT CAST(SUM(CASE WHEN T1.division = 'East North Central' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.division) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Stars = 5

Database: airline
Question: On August 2018, which day had the highest number of cancelled flights due to the most serious reasons in Dallas/Fort Worth International?
Evidence: On August 2018 refers to FL_DATE like '2018/8%'; day with the highest number of cancelled flights refers to MAX(COUNT(FL_DATE WHERE CANCELLED = 1)); cancelled due to the most serious reasons refers to CANCELLATION_CODE = 'A'; in Dallas/Fort Worth International refers to Description = 'Dallas/Fort Worth, TX: Dallas/Fort Worth International';
SQL: SELECT T2.FL_DATE FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN WHERE T2.FL_DATE LIKE '2018/8%' AND T1.Description = 'Dallas/Fort Worth, TX: Dallas/Fort Worth International' AND T2.ORIGIN = 'DFW' AND T2.CANCELLED = 1 AND T2.CANCELLATION_CODE = 'A' GROUP BY T2.FL_DATE ORDER BY COUNT(T2.FL_DATE) DESC LIMIT 1

Database: authors
Question: What is the title of the paper with the most authors?
Evidence: paper refers to paper.Id; paper with the most authors refers to MAX(PaperAuthor.PaperId)
SQL: SELECT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id GROUP BY T1.PaperId ORDER BY COUNT(T1.PaperId) DESC LIMIT 1

Database: authors
Question: How many papers are published under the journal "Software - Practice and Experience"?
Evidence: papers refers to Paper.Id; 'Software - Practice and Experience' is the FullName of a journal;
SQL: SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T2.FullName = 'Software - Practice and Experience'

Database: authors
Question: What is the oldest published book?
Evidence: published book refers to Title; the oldest book refers to MIN(Year)
SQL: SELECT Title FROM Paper WHERE Year > 0 ORDER BY Year ASC LIMIT 1