Database: disney
Question: Name the director of Disney's lowest grossing movie.
Evidence: lowest grossing movie refers to movie_title where MIN(total_gross);
SQL: SELECT T2.director FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name ORDER BY CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) ASC LIMIT 1

Database: movie_3
Question: Among the payments made by Mary Smith, how many of them are over 4.99?
Evidence: over 4.99 refers to amount > 4.99
SQL: SELECT COUNT(T1.amount) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' AND T1.amount > 4.99

Database: synthea
Question: By how much did Elly Koss's weight increase from the observation in 2008 to the observation in 2009?
Evidence: SUBTRACT((DATE like '2009%'), (DATE like '2008%')) where DESCRIPTION = 'Body Weight';
SQL: SELECT SUM(CASE WHEN strftime('%Y', T2.date) = '2009' THEN T2.VALUE END) - SUM(CASE WHEN strftime('%Y', T2.date) = '2008' THEN T2.VALUE END) AS increase , T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Body Height'

Database: address
Question: Please list the bad alias of all the residential areas with a median female age of over 32.
Evidence: median female age of over 32 refers to median_female_age > 32
SQL: SELECT DISTINCT T2.bad_alias FROM zip_data AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code WHERE T1.female_median_age > 32

Database: legislator
Question: Which party does Christopher Henderson Clark belong to?
Evidence: Christopher Henderson Clark is full name; full name refers to first_name, middle_name, last_name
SQL: SELECT T1.party FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name OR T2.middle_name OR T2.last_name = 'ChristopherHendersonClark'

Database: human_resources
Question: List the full names, gender and positions who's location is in New York city.
Evidence: full name = firstname, lastname; New York city refers to locationcity = 'New York City'
SQL: SELECT T1.firstname, T1.lastname, T1.gender, T3.positiontitle FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T2.locationcity = 'New York City'

Database: movielens
Question: What is the average occupation of users whose ratings are not more than 2 ?
SQL: SELECT AVG(T2.occupation) FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T1.rating < 2

Database: student_loan
Question: How many months has student217 been absent?
SQL: SELECT month FROM longest_absense_from_school WHERE name = 'student217'

Database: synthea
Question: Among the white patients, what is the average body height of the patients?
Evidence: white refers to race = 'white'; average body height = AVG(observations.VALUE WHERE observations.DESCRIPTION = 'Body Height'); body height refers to observations.DESCRIPTION = 'Body Height';
SQL: SELECT AVG(T1.VALUE) FROM observations AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.race = 'white' AND T1.DESCRIPTION = 'Body Height'

Database: car_retails
Question: List out full name of employees who are working in Tokyo?
Evidence: Tokyo is a city; full name = firstName+lastName;
SQL: SELECT T1.firstName, T1.lastName FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.city = 'Tokyo'

Database: synthea
Question: How many patients of Irish ethnicity take medication for 'myocardial infarction'?
Evidence: take medication for myocardial infarction refers to medications.REASONDESCRIPTION = 'Myocardial Infarction';
SQL: SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.REASONDESCRIPTION = 'Myocardial Infarction' AND T1.ethnicity = 'irish'

Database: legislator
Question: Give the state and type of term of the legislator with the google entity ID of kg:/m/02pyzk.
Evidence: type of term refers to type; google entity ID refers to google_entity_id_id; google_entity_id_id = 'kg:/m/02pyzk';
SQL: SELECT T2.state, T2.type FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.google_entity_id_id = 'kg:/m/02pyzk'

Database: cs_semester
Question: What is the first and last name of students with highest gpa?
Evidence: first name refers of students refers to f_name; last name of students refers to l_name; highest gpa refers to MAX(gpa);
SQL: SELECT f_name, l_name FROM student WHERE gpa = ( SELECT MAX(gpa) FROM student )

Database: movie_3
Question: Give me the title and category name of films whose price per day is more than $30. Please include their special features.
Evidence: category name refers to category.name; price per day is more than $30 refers to multiply(rental_duration, rental_rate) > 30
SQL: SELECT T1.title, T3.name, T1.special_features FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T1.rental_duration * T1.rental_rate > 30

Database: codebase_comments
Question: What is the average processed time of the solution with a repository of 254 likes, 88 followers, and 254 watchers?
Evidence: average processed time = AVG(ProcessedTime);
SQL: SELECT CAST(SUM(T2.ProcessedTime) AS REAL) / COUNT(T2.ProcessedTime) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = 254 AND T1.Forks = 88 AND T1.Watchers = 254

Database: professional_basketball
Question: Which team did the youngest player who could be in F-G position play in the NBA?
Evidence: team refers to tmID; the youngest refers to max(year); F-G position refers to pos like '%F'; NBA refers to lgID = 'NBA'
SQL: SELECT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN players AS T3 ON T2.playerID = T3.playerID WHERE T3.pos = 'F-G' AND T2.lgID = 'NBA' ORDER BY T3.birthDate DESC LIMIT 1

Database: world
Question: In which continent does the country with the smallest surface area belongs?
Evidence: smallest surface area refers to MIN(smallest surface area);
SQL: SELECT Continent FROM Country ORDER BY SurfaceArea LIMIT 1

Database: trains
Question: Please list the IDs of all the cars with double sides on trains that run in the west direction.
Evidence: double sides on trains refers to sides = 'double'
SQL: SELECT T1.id FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T2.direction = 'east' AND T1.sides = 'double'

Database: food_inspection_2
Question: What is the assumed name of the business that has the highest total fine in 2014?
Evidence: assumed name of business refers to dba_name; the highest total fine refers to max(sum(fine)); in 2014 refers to inspection_date like '2014%'
SQL: SELECT T.dba_name FROM ( SELECT T1.dba_name, SUM(T3.fine) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE strftime('%Y', T2.inspection_date) = '2014' GROUP BY T1.dba_name ORDER BY SUM(T3.fine) DESC LIMIT 1 ) AS T

Database: public_review_platform
Question: How many businesses have more than 1 attribute?
Evidence: businesses have more than 1 attribute refers to COUNT(attribute_value) > 1
SQL: SELECT COUNT(business_id) FROM Business_Attributes WHERE attribute_value > 1

Database: university
Question: What is the total number of ranking criteria under the ranking system called Shanghai Ranking?
Evidence: ranking system called Shanghai Ranking refers to system_name = 'Shanghai Ranking';
SQL: SELECT COUNT(*) FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T1.system_name = 'Shanghai Ranking'