Database: car_retails
Question: Which product did Cruz & Sons Co. ask for the biggest amount in a single order?
Evidence: Cruz & Sons Co. is name of customer; the biggest amount refers to MAX(quantityOrdered).
SQL: SELECT t4.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber INNER JOIN products AS t4 ON t1.productCode = t4.productCode WHERE t3.customerName = 'Cruz & Sons Co.' ORDER BY t1.priceEach * t1.quantityOrdered DESC LIMIT 1

Database: superstore
Question: Among the customers from Indiana, what is the percentage of their purchased orders in the Central region with no discount?
Evidence: Indiana refers to State = 'Indiana'; no discount refers to Discount = 0; percentage = divide(sum(Discount) when Discount = 0, count(Discount)) as percentage
SQL: SELECT CAST(SUM(CASE  WHEN T2.Discount = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.Region = 'Central' AND T1.State = 'Indiana'

Database: public_review_platform
Question: Please list all business IDs in Mesa city that review stars of over 3.
Evidence: stars > 3;
SQL: SELECT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Mesa' AND T2.review_stars > 3 GROUP BY T1.business_id

Database: shakespeare
Question: Give the title and the characters name of the most recent work of Shakespeare.
Evidence: characters name refers to CharName; most recent work refers to max(Date)
SQL: SELECT T1.Title, T4.CharName 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 ORDER BY T1.Date DESC LIMIT 1

Database: world
Question: How many languages are there in the country where Tocantins district belongs?
SQL: SELECT COUNT(DISTINCT T2.Language) FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.District = 'Tocantins'

Database: movie_3
Question: Provide the list of the longest movies. Arrange these titles in alphabetical order.
Evidence: the longest refers to max(length)
SQL: SELECT title FROM film WHERE length = ( SELECT MAX(length) FROM film )

Database: coinmarketcap
Question: Had Bitcoin's price increased or decreased on 2013/5/5 compared with the price 7 days before?
Evidence: price increased refers to percent_change_7d>0; decreased refers percent_change_7d<0; on 2013/5/5 refers to date = '2013-05-05'
SQL: SELECT (CASE WHEN T2.percent_change_7d > 0 THEN 'INCREASED' ELSE 'DECREASED' END) FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-05-05' AND T1.name = 'Bitcoin'

Database: world_development_indicators
Question: What is the average adolescent fertility rate of the country whose Alpha2Code is 1A over the years this indicator was calculated.
Evidence: the average adolescent fertility rate is DIVIDE(SUM(value), SUM(IndicatorName like 'adolescent fertility rate%'))
SQL: SELECT AVG(T2.Value) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.Alpha2Code = '1A' AND T2.IndicatorName LIKE 'adolescent fertility rate%'

Database: regional_sales
Question: Please list the customer names whose order quantity was more than 5 on 6/1/2018.
Evidence: order quantity was more than 5 on 6/1/2018 refers to Order Quantity > 5 where OrderDate = 6/1/2018;
SQL: SELECT T FROM ( SELECT DISTINCT CASE  WHEN SUM(T1.`Order Quantity`) > 5 THEN T2.`Customer Names` END AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID WHERE T1.OrderDate = '6/1/18' GROUP BY T1._CustomerID ) WHERE T IS NOT NULL

Database: mental_health_survey
Question: State the number of questions that were asked in the "mental health survey for 2018".
Evidence: mental health survey for 2018 refers to SurveyID = 2018
SQL: SELECT COUNT(T1.QuestionID) FROM Answer AS T1 INNER JOIN Survey AS T2 ON T1.SurveyID = T2.SurveyID WHERE T2.Description = 'mental health survey for 2018'

Database: public_review_platform
Question: In businesses with a category of mexican, how many of them has a star rating below 4?
Evidence: category of mexican refers to category_name = 'Mexican'; star rating below 4 refers to stars < 4
SQL: SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.stars < 4 AND T3.category_name LIKE 'Mexican'

Database: simpson_episodes
Question: What are the roles of the cast and crew from countries other than the USA?
Evidence: from countries other than the USA refers to birth_country ! = 'USA'
SQL: SELECT T2.role FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T1.birth_country != 'USA';

Database: synthea
Question: What is the medicine prescribed for the patient with social security number 999-94-3751?
Evidence: medicine prescribed refers to DESCRIPTION from medications; social security number 999-94-3751 refers to ssn = '999-94-3751';
SQL: SELECT T1.DESCRIPTION FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.ssn = '999-94-3751'

Database: world_development_indicators
Question: Please list the countries under the lending category of the International Development Associations and have a external debt reporting finished by estimation.
Evidence: countries refer to the ShortName; International Development Associations refers to lendingcategory = 'IDA'; have a external debt reporting finished by estimation refers to ExternalDebtReportingStatus = 'Estimate'
SQL: SELECT ShortName, ExternalDebtReportingStatus FROM Country WHERE LendingCategory = 'IDA'

Database: simpson_episodes
Question: How many 1 star ratings are there in the worst rated episode of the season?
Evidence: worst rated episode refers to MIN(rating)
SQL: SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = 1 ORDER BY T1.rating LIMIT 1;

Database: public_review_platform
Question: List the closing time and day of week of active businesses in Scottsdale with stars greater than the 60% of average age of star rating.
Evidence: active business refers to active = 'true';  'Scottsdale' is the name of city; stars greater than the 60% of average age of star rating refers to stars  > avg(stars) * 60%
SQL: SELECT T2.closing_time, T3.day_of_week FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city LIKE 'Scottsdale' AND T1.active LIKE 'TRUE' AND T1.stars > 0.6 * ( SELECT AVG(T1.stars) FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city LIKE 'Scottsdale' AND T1.active LIKE 'TRUE' )

Database: retails
Question: Give the name of the customer who made an order with Clerk#000000803 on 1997/12/10.
Evidence: name of the customer refers to c_name; o_clerk = 'Clerk#000000803'; order on 1997/12/10 refers to o_orderdate = '1997-12-10';
SQL: SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderdate = '1997-12-10' AND T1.o_clerk = 'Clerk#000000803'

Database: retail_complains
Question: Please list the full names of all the male clients born after the year 1990.
Evidence: full names = first, middle, last; male refers to sex = 'Male'; year > 1990;
SQL: SELECT first, middle, last FROM client WHERE year > 1990