Database: synthea
Question: Provide at least 5 social security numbers of patients with a prevalent disease with a prevalence percentage lower than 30% of the average prevalence percentage of conditions.
Evidence: social security number refers to ssn; prevalence percentage lower than 30% of the average prevalence percentage of conditions refers to PREVALENCE PERCENTAGE < MULTIPLY(0.3, AVG(PREVALENCE PERCENTAGE));
SQL: SELECT DISTINCT T2.ssn FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN all_prevalences AS T3 ON lower(T1.DESCRIPTION) = lower(T3.ITEM) WHERE CAST(T3."PREVALENCE PERCENTAGE" AS REAL) * 100 / ( SELECT AVG('PREVALENCE PERCENTAGE') FROM all_prevalences ) < 30 LIMIT 5

Database: disney
Question: Which director did Bill Thompson work the most with?
Evidence: Bill Thompson refers to voice-actor = 'Bill Thompson'; worked the most refers to MAX(COUNT(name));
SQL: SELECT director FROM director AS T1 INNER JOIN `voice-actors` AS T2 ON T1.name = T2.movie WHERE T2.`voice-actor` = 'Bill Thompson' GROUP BY director ORDER BY COUNT(director) DESC LIMIT 1

Database: chicago_crime
Question: Among the crimes in Woodlawn, how many of them happened in January, 2018?
Evidence: Woodlawn refers to community_area_name = 'Woodlawn'; in January 2018 refers to date like '%1/2018%'
SQL: SELECT SUM(CASE WHEN T1.community_area_name = 'Woodlawn' THEN 1 ELSE 0 END) FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no WHERE T2.date LIKE '%1/2018%'

Database: soccer_2016
Question: How many matches are there in 2008?
Evidence: in 2008 refers to Match_Date like '2008%'
SQL: SELECT COUNT(Match_Id) FROM `Match` WHERE Match_Date LIKE '2008%'

Database: donor
Question: If funded, which are the projects that could impact at least 600 students for a school with moderate level of poverty? Name the projects and state the project cost.
Evidence: impact at least 600 students refers to students_reached > = 600; moderate level of poverty refers to poverty_level = 'moderate poverty'; project name refers to title; project cost refers to total_price_excluding_optional_support
SQL: SELECT DISTINCT T2.title, T1.total_price_excluding_optional_support FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T1.students_reached >= 600 AND T1.poverty_level LIKE 'moderate poverty'

Database: public_review_platform
Question: How many users who started yelping since 2012 have sent a high number of funny votes?
Evidence: users who started yelping in 2012 refers to user_yelping_since_year = '2012'; high number of funny votes refers to user_votes_funny = 'High';
SQL: SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year = 2012 AND user_votes_funny LIKE 'High'

Database: shooting
Question: For case number '134472-2015', list the last name of the officers involved and state the subject statuses.
SQL: SELECT T2.last_name, T1.subject_statuses FROM incidents AS T1 INNER JOIN officers AS T2 ON T1.case_number = T2.case_number WHERE T1.case_number = '134472-2015'

Database: retails
Question: How many parts have a jumbo case container?
Evidence: jumbo case container refers to p_container = 'JUMBO CASE'
SQL: SELECT COUNT(p_partkey) FROM part WHERE p_container = 'JUMBO CASE'

Database: retail_world
Question: Tally the customer ID of orders that were shipped to Brazil by Margaret Peacock from 3/31/97 to 12/10/97.
Evidence: "Brazil" is the ShipCountry; from 3/31/97 to 12/10/97 refers to 1997-03-31 < ShippedDate < 1997-10-12
SQL: SELECT DISTINCT T2.CustomerID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.LastName = 'Peacock' AND T1.FirstName = 'Margaret' AND T2.ShipCountry = 'Brazil' AND T2.ShippedDate BETWEEN '1997-03-31 00:00:00' AND '1997-12-10 23:59:59'

Database: mental_health_survey
Question: For all the users who have been asked "Have you ever been diagnosed with a mental health disorder?", how many of them said "Yes"?
Evidence: have asked refers to questiontext; said 'Yes' refers to AnswerText = 'Yes'
SQL: SELECT COUNT(T1.UserID) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questiontext LIKE 'Have you ever been diagnosed with a mental health disorder?' AND T1.AnswerText = 'Yes'

Database: codebase_comments
Question: How many solution path does the repository with 111 stars, 58 forks, and 111 watchers?
Evidence: solution path refers to Path;
SQL: SELECT COUNT(T2.Path) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = 111 AND T1.Forks = 58 AND T1.Watchers = 111

Database: soccer_2016
Question: Among all the players born after the year 1985, what is the percentage of the players who use the right hand as their batting hand?
Evidence: born after the year 1985 refers to SUBSTR(DOB, 1, 4) > 1985; right hand as batting hand refers to Batting_Hand = 'Right-hand bat'; percentage = divide(count(Player_Id where Batting_Hand = 'Right-hand bat'), count(Player_Id)) * 100% where SUBSTR(DOB, 1, 4) > 1985
SQL: SELECT CAST(SUM(CASE WHEN T2.Batting_Hand = 'Right-hand bat' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Player_Id) FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id WHERE SUBSTR(T1.DOB, 1, 4) > 1985

Database: legislator
Question: Give the full name of the legislators with an independent party.
Evidence: full name refers to official_full_name;
SQL: SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Independent' GROUP BY T1.official_full_name

Database: retail_world
Question: Name the shipper which had the most shipments in first quarter of 1998.
Evidence: Name the shipper refers to CompanyName; most shipments refers to max(count(OrderID)); first quarter of 1998 refers to ShippedDate = 1998/1 and ShippedDate = 1998/2 and ShippedDate = 1998/3 and ShippedDate = 1998/4
SQL: SELECT T1.CompanyName FROM Shippers AS T1 INNER JOIN Orders AS T2 ON T1.ShipperID = T2.ShipVia WHERE STRFTIME('%Y', T2.ShippedDate) = '1998' GROUP BY T1.CompanyName ORDER BY COUNT(T2.OrderID) DESC LIMIT 1

Database: university
Question: What is the name of the ranking system for Teaching criteria?
Evidence: Teaching criteria refers to criteria_name = 'Teaching'; name of the ranking system refers to system_name
SQL: SELECT T1.system_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T2.criteria_name = 'Teaching'

Database: regional_sales
Question: Please list all sale team names which had orders on 5/31/2018.
Evidence: had orders on 5/31/2018 refer to OrderDate = '5/31/18'; sale team names refer to Sales Team;
SQL: SELECT T FROM ( SELECT DISTINCT CASE  WHEN T1.OrderDate = '5/31/18' THEN T2.`Sales Team` 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: retail_complains
Question: List the product and its issues of the complains of clients with age greater than the 60% of average age of all clients.
Evidence: age greater than the 60% of average age refers to age > multiply(avg(age) , 0.6)
SQL: SELECT DISTINCT T2.Product, T2.Issue FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.age * 100 > ( SELECT AVG(age) * 60 FROM client )

Database: retails
Question: How many order keys are not applied for the discount?
Evidence: order key refers to l_orderkey; not applied for the discount refers to l_discount = 0
SQL: SELECT COUNT(l_orderkey) FROM lineitem WHERE l_discount = 0