Database: car_retails
Question: How many customers have an employee who reports to William Patterson as their sales representitive?
Evidence: reportsTO' is the leader of the 'employeeNumber';
SQL: SELECT COUNT(t1.customerNumber) FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'William' AND t2.lastName = 'Patterson'

Database: public_review_platform
Question: Among the businesses in Chandler, list the attribute of the business with a low review count.
Evidence: in Chandler refers to city = 'Chandler'; attribute refers to attribute_name
SQL: SELECT DISTINCT T3.attribute_id, T3.attribute_name FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.attribute_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T1.review_count = 'Low' AND T1.city = 'Chandler'

Database: superstore
Question: Among the orders with sales value of no less than 5,000 in west superstore, how many were bought by the customers in California?
Evidence: customers in California refers to State = 'California'; orders with sales value of no less than 5,000 refers to Sales > = 5,000
SQL: SELECT COUNT(DISTINCT T1.`Order ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` INNER JOIN people AS T3 ON T3.`Customer ID` = T1.`Customer ID` WHERE T1.Sales > 5000 AND T3.State = 'California' AND T2.Region = 'West'

Database: world_development_indicators
Question: What are the full names of the countries in South Asia that belongs to the low income group?
Evidence: full name refers to longname; the countries in South Asia refer to region = 'South Asia'; belongs to the low income group refers to incomegroup = 'Low income'
SQL: SELECT LongName FROM Country WHERE IncomeGroup = 'Low income' AND Region = 'South Asia'

Database: movies_4
Question: What keyword can the user use to search for the movie Finding Nemo?
Evidence: What keyword refers to keyword_name; Finding Nemo refers to title = 'Finding Nemo'
SQL: SELECT T3.keyword_name FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T1.title = 'Finding Nemo'

Database: airline
Question: What are the names of the top 5 airlines with the highest number of aircraft?
Evidence: names of the airlines refers to Description; highest number of aircraft refers to MAX(COUNT(TAIL_NUM));
SQL: SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code GROUP BY T2.Description ORDER BY T1.TAIL_NUM DESC LIMIT 5

Database: simpson_episodes
Question: For the episode who won the award held by Jupiter Award, describe award name, aired date and rating of that episode.
Evidence: held by Jupiter Award refers to organization = 'Jupiter Award'; won the award refers to result = 'Winner'
SQL: SELECT T1.award, T2.air_date, T2.rating FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.organization = 'Jupiter Award' AND T1.result = 'Winner';

Database: sales
Question: Write down all of the product ids that were placed by Meander.
SQL: SELECT DISTINCT T2.ProductID FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T1.FirstName = 'Meander'

Database: computer_student
Question: List down all the person IDs who taught course ID of 18.
Evidence: person IDs refers to taughtBy.p_id; course ID of 18  refers to taughtBy.course_id = 18
SQL: SELECT p_id FROM taughtBy WHERE course_id = 18

Database: video_games
Question: In which region where a game had the lowest number of sales?
Evidence: which region refers to region_name; lowest number of sales refers to MIN(num_sales);
SQL: SELECT DISTINCT T1.region_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id ORDER BY T2.num_sales LIMIT 1

Database: music_tracker
Question: How many times has the release "city funk" been downloaded?
Evidence: groupName = 'city funk'; downloaded refers to totalSnatched;
SQL: SELECT totalSnatched FROM torrents WHERE groupName LIKE 'city funk'

Database: professional_basketball
Question: Which teams have winning rate less than 50%?
Evidence: team with winning rate less than 50% refers to Divide (won, Sum(won, lost)) < 0.5
SQL: SELECT name FROM teams WHERE CAST(won AS REAL) * 100 / (won + lost) < 50

Database: computer_student
Question: Please list the IDs of the professors that teaches more than 3 courses.
Evidence: IDs of the professors refers to taughtBy.p_id and professor = 1; teaches more than 3 courses  refers to count(course_id) > 3
SQL: SELECT T1.p_id FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1 GROUP BY T1.p_id HAVING COUNT(DISTINCT T1.course_id) > 3

Database: public_review_platform
Question: What is the category of the business with medium review length and highest review stars within business ID from 6 t0 9?
Evidence: category refers to category_name; highest review stars refers to max(review_stars); business ID from 6 to 9 refers to business_id between 6 and 9
SQL: SELECT T4.category_name FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T1.review_length LIKE 'Medium' AND T2.business_id BETWEEN 6 AND 9 ORDER BY T1.review_stars DESC LIMIT 1

Database: movies_4
Question: Which actor plays Optimus Prime?
Evidence: Which actor refers to person_name; Optimus Prime refers to character_name = 'Optimus Prime (voice)'
SQL: SELECT DISTINCT T1.person_name FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T2.character_name = 'Optimus Prime (voice)'

Database: menu
Question: Provide the menu page ids of all the menu that includes mashed potatoes.
Evidence: mashed potatoes is a name of dish;
SQL: SELECT T2.menu_page_id FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Mashed potatoes'

Database: student_loan
Question: What is the ratio of students who have payment due and those who do not have payment due?
Evidence: ratio =  DIVIDE(COUNT(name WHERE `bool` = 'pos'), COUNT(name WHERE `bool` = 'neg')); have payment due refers to `bool` = 'pos'; no payment due refers to `bool` = 'neg';
SQL: SELECT CAST(SUM(IIF(`bool` = 'pos', 1, 0)) AS REAL) / SUM(IIF(`bool` = 'neg', 1, 0)) FROM no_payment_due

Database: retail_world
Question: Which phone number should I call if I want to reach Nancy Davolio's home?
Evidence: phone number of Nancy Davolio's home refers to HomePhone WHERE FirstName = 'Nancy' AND LastName = 'Davolio';
SQL: SELECT HomePhone FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy'

Database: retail_complains
Question: Give me the full birthdate, email and phone number of the youngest client in Indianapolis .
Evidence: full birthdate = year, month, day; youngest refers to max(year, month, day); in Indianapolis refers to city = 'Indianapolis'
SQL: SELECT T1.year, T1.month, T1.day, T1.email, T1.phone FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Indianapolis' ORDER BY T1.year DESC, T1.month DESC, T1.day DESC LIMIT 1

Database: movie_3
Question: Calculate the total payment amount by Diane Collins.
Evidence: 'Diane Collins' is a full name of a customer; full name refers to first_name, last_name
SQL: SELECT SUM(T2.amount) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'Diane' AND T1.last_name = 'Collins'