Database: mental_health_survey
Question: In 2019, how many users in the United States have a family history of mental illness?
Evidence: 2019 refer to SurveyID; Users in the United States refers to AnswerText = 'United States' where questionid = 3; have a family history of mental illness refers to AnswerText = 'Yes' where questionid = 6
SQL: SELECT COUNT(T1.UserID) FROM Answer AS T1 INNER JOIN ( SELECT T2.questionid FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T1.SurveyID = 2019 AND T2.questionid = 6 AND T1.AnswerText LIKE 'Yes' ) AS T2 ON T1.QuestionID = T2.questionid WHERE T1.SurveyID = 2019 AND T2.questionid = 3 AND T1.AnswerText LIKE 'United States'

Database: retail_complains
Question: How many complaints made by women and served after 3 pm received a timely response from the company?
Evidence: women refers to sex = 'Female'; served after 3 pm refers to ser_time BETWEEN '15:00:01' AND '23:59:59'; received a timely response refers to "Timely response?" = 'Yes';
SQL: SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN events AS T3 ON T1.`Complaint ID` = T3.`Complaint ID` WHERE T2.sex = 'Female' AND T1.ser_start BETWEEN '15:00:01' AND '23:59:59' AND T3.`Timely response?` = 'Yes'

Database: book_publishing_company
Question: Please give more detailed information about the first three books that sell the best.
Evidence: qty is abbreviation for quantity; sells the best mean with the most sales quantity; MAX(qty)
SQL: SELECT T1.notes FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id ORDER BY T2.qty DESC LIMIT 3

Database: beer_factory
Question: How many transactions were made to purchase a bottle of beer using American Express?
Evidence: bottle of beer refers to ContainerType = 'Bottle'; American Express refers to CreditCardType = 'American Express';
SQL: SELECT COUNT(T1.RootBeerID) FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID WHERE T1.ContainerType = 'Bottle' AND T2.CreditCardType = 'American Express'

Database: shipping
Question: Where does the driver of ship ID 1127 live?
Evidence: live refers to address
SQL: SELECT T2.address FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_id = '1127'

Database: world
Question: What is the official language of China?
Evidence: official language refers to IsOfficial = 'T'; China is a name of country;
SQL: SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'China' AND T2.IsOfficial = 'T'

Database: regional_sales
Question: What is the average household income of Glendale?
Evidence: "Glendale" is the City Name; Average household income refers to avg(Household Income)
SQL: SELECT AVG(`Household Income`) FROM `Store Locations` WHERE `City Name` = 'Glendale'

Database: movie_platform
Question: Who is the director that made the most movies? Give the director's id.
Evidence: director that made the most movies refers to MAX(COUNT(movie_id))
SQL: SELECT director_id FROM movies GROUP BY director_id ORDER BY COUNT(movie_id) DESC LIMIT 1

Database: simpson_episodes
Question: What is the average heights of crew members from Animation Department?
Evidence: from Animation Department refers to category = 'Animation Department'; AVG(height_meters) where category = 'Animation Department'
SQL: SELECT AVG(T1.height_meters) FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Animation Department';

Database: food_inspection_2
Question: What is the employee's full name involved in the canvass inspection type on March 09, 2010?
Evidence: full name refers to first_name, last_name; canvass inspection type refers to inspection_type = 'Canvass'; on March 09, 2010 refers to inspection_date = '2010-03-09'
SQL: SELECT DISTINCT T1.first_name, T1.last_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_date = '2010-03-09' AND T2.inspection_type = 'Canvass'

Database: movie_platform
Question: Who created the list that has 142 comments? Indicate the user id of the user, if there are multiple lists with 142 comments, list the user id of the person who created the list
Evidence: list that has 142 comments refers to list_comments = 142
SQL: SELECT user_id FROM lists WHERE list_comments = 142

Database: college_completion
Question: In Harvard University, which year recorded the highest number of first-time, full-time, degree-seeking students in the cohort being tracked, minus any exclusions?
Evidence: Harvard University refers to chronname = 'Harvard University'; highest number of first-time, full-time, degree-seeking students in the cohort being tracked, minus any exclusions refers to MAX(grad_cohort);
SQL: SELECT T2.year FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Harvard University' GROUP BY T2.year ORDER BY SUM(T2.grad_cohort) DESC LIMIT 1

Database: restaurant
Question: What is the full address of Albert's Café?
Evidence: full address = street_num, street_name, city; Albert's Café refers to label = 'Albert's Café'
SQL: SELECT T2.street_num, T2.street_name, T1.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'Albert''s Café'

Database: professional_basketball
Question: Among the players that went to high school in New York and have won the MVP, what is their average height?
Evidence: high school in New York refers to highSchool like '%New York%'; won the MVP refers to award = 'Most Valuable Player'; average height = Divide (Sum(height), Count(playerID))
SQL: SELECT AVG(T1.height) FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Most Valuable Player' AND T1.birthCity = 'New York'

Database: music_tracker
Question: How many singles were released between 1979 and 1981 labeled as "soul"?
Evidence: releaseType = 'single'; between 1979 and 1981 refers to groupYear between 1979 and 1981; tag = 'soul';
SQL: SELECT COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'soul' AND T1.groupYear BETWEEN 1979 AND 1981 AND T1.releaseType LIKE 'single'

Database: image_and_language
Question: Name the object class of the image with a bounding (422, 63, 77, 363).
Evidence: image with a bounding (422, 63, 77, 363) refers to OBJ_CLASS_ID where X = 422 and Y = 63 and W = 77 and H = 363;
SQL: SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 422 AND T1.Y = 63 AND T1.W = 77 AND T1.H = 363

Database: soccer_2016
Question: Give the name of the venue where the most number of matches are held.
Evidence: name of the venue refers to Venue_Name; most number of matches refers to max(count(Venue_Id))
SQL: SELECT T2.Venue_Name FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id GROUP BY T2.Venue_Name ORDER BY COUNT(T2.Venue_Id) DESC LIMIT 1

Database: image_and_language
Question: Which object has the highest attribute classes?
Evidence: object has the highest attribute classes refers to OBJ_SAMPLE_ID where MAX(COUNT(OBJ_SAMPLE_ID));
SQL: SELECT OBJ_SAMPLE_ID FROM IMG_OBJ_ATT GROUP BY OBJ_SAMPLE_ID ORDER BY COUNT(OBJ_SAMPLE_ID) DESC LIMIT 1

Database: retails
Question: What is the total quantity of the part "hot spring dodger dim light" ordered in all orders?
Evidence: total quantity refers to sum(l_quantity); part "hot spring dodger dim light" refers to p_name = 'hot spring dodger dim light'
SQL: SELECT SUM(T1.p_partkey) FROM part AS T1 INNER JOIN lineitem AS T2 ON T1.p_partkey = T2.l_partkey WHERE T1.p_name = 'hot spring dodger dim light'