Database: law_episode
Question: Who is the stunt coordinator in episode 3?
Evidence: who refers to name; stunt coordinator refers to role = 'stunt coordinator'
SQL: SELECT T3.name FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T1.episode = 3 AND T2.role = 'stunt coordinator'

Database: ice_hockey_draft
Question: How tall is the player from Yale University who picked up 28 penalty minutes in the 2005-2006 season?
Evidence: how tall refers to height_in_cm; Yale University refers to TEAM = 'Yale Univ.'; 28 penalty minutes refers to PIM = '28'; 2005-2006 season refers to SEASON = '2005-2006';
SQL: SELECT T3.height_in_cm FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T2.height = T3.height_id WHERE T1.SEASON = '2005-2006' AND T1.TEAM = 'Yale Univ.' AND T1.PIM = 28

Database: shipping
Question: What is the truck's model year used to ship the ship ID 1245?
SQL: SELECT T1.model_year FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = '1245'

Database: computer_student
Question: What is the average number of students for each advisor?
Evidence: students refers to advisedBy.p_id; advisor refers to p_id_dummy; average number = avg(count(advisedBy.p_id))
SQL: SELECT CAST(COUNT(p_id) AS REAL) / COUNT(DISTINCT p_id_dummy) AS avgnum FROM advisedBy GROUP BY p_id_dummy

Database: codebase_comments
Question: Among the repositories with over 200 likes, how many of them have files contained by solutions with a processed time of under 636439500080712000?
Evidence: over 200 likes refers to Stars > 200; ProcessedTime<636439500080712000;
SQL: SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.ProcessedTime < 636439500080712000 AND T1.Stars > 200

Database: movie_3
Question: List the store ID of the films with a rental rate greater than the 60% of average rental rate of all listed films.
Evidence: average rental rate of all listed films refers to AVG(rental_rate); rental rate greater than the 60% of average rental rate refers to rental_rate > (AVG(rental_rate)) MULTIPLY 0.6
SQL: SELECT T2.store_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T1.rental_rate > ( SELECT AVG(T1.rental_rate) * 0.6 FROM film AS T1 )

Database: soccer_2016
Question: Give the match's venue and winning team for the match ID 392194.
Evidence: venue refers to Venue_Name; winning team refers to match_winner
SQL: SELECT T1.Venue_Name, T3.Team_Name FROM Venue AS T1 INNER JOIN Match AS T2 ON T1.venue_id = T2.venue_id INNER JOIN Team AS T3 ON T2.match_winner = T3.Team_Id WHERE T2.Match_Id = 392194

Database: food_inspection
Question: How many restaurants have met all requirements in the inspection?
Evidence: met all requirements in the inspection refers to score = 100;
SQL: SELECT COUNT(score) FROM inspections WHERE score = 100

Database: olympics
Question: Calculate the average age of the competitors who participated in the 1924 Winter.
Evidence: AVG(age) where games_name = '1924 Winter';
SQL: SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '1924 Winter'

Database: law_episode
Question: How many awards did the "Agony" win?
Evidence: the "Agony" refers to title = 'Agony'; win refers to result = 'Winner'
SQL: SELECT COUNT(T2.award) FROM Episode AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Agony' AND T2.result = 'Winner'

Database: simpson_episodes
Question: List all of the information about the music department's casts and crews.
Evidence: information about the music department refers to category = 'Music Department'
SQL: SELECT DISTINCT person, name, birthdate, birth_name, birth_place , birth_region, birth_country, height_meters, nickname FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Music Department';

Database: retail_complains
Question: List down the email of client whose complaint is type "PS".
SQL: SELECT T1.email FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'PS'

Database: soccer_2016
Question: What are the match IDs that were played at Brabourne Stadium?
Evidence: at Brabourne Stadium refers to Venue_Name = 'Brabourne Stadium'
SQL: SELECT T1.Match_Id FROM Match AS T1 INNER JOIN Venue AS T2 ON T2.Venue_Id = T1.Venue_Id WHERE T2.Venue_Name = 'Brabourne Stadium'

Database: shooting
Question: Among the cases dismissed by the grand jury disposition, what percentage of cases is where the subject is injured?
Evidence: dismissed by the grand jury disposition refers to grand_jury_disposition = 'No Bill'; the subject is injured refers to subject_statuses = 'injured'; percentage = divide(count(incidents where subject_statuses = 'injured'), count(incidents)) where grand_jury_disposition = 'No Bill' * 100%
SQL: SELECT CAST(SUM(subject_statuses = 'Injured') AS REAL) * 100 / COUNT(case_number) FROM incidents WHERE grand_jury_disposition = 'No Bill'

Database: student_loan
Question: Please list the departments the students are absent from school for 9 months are in.
Evidence: absent from school for 9 months refers to month = 9
SQL: SELECT T2.organ FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T1.`month` = 9

Database: donor
Question: Name the project titles created by teacher who acquired a doctor degree.
Evidence: teacher who acquired a doctor degree refers to teacher_prefix = 'Dr.'
SQL: SELECT T1.title FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_message LIKE 'Donation on behalf of Matt Carpenter because I''m a strong believer in education.'

Database: chicago_crime
Question: Among the incidents reported in Harrison, what percentage are disorderly conduct?
Evidence: "Harrison" is the district_name;  'Disorderly Conduct' is the title; percentage = Divide (Count(title = 'Disorderly Conduct'), Count(report_no)) * 100; incident report refers to report_no
SQL: SELECT COUNT(CASE WHEN T3.title = 'Disorderly Conduct' THEN T2.report_no END) * 100.0 / COUNT(T2.report_no) AS per FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no INNER JOIN FBI_Code AS T3 ON T3.fbi_code_no = T2.fbi_code_no WHERE T1.district_name = 'Harrison'

Database: talkingdata
Question: Among all the users who use a vivo device, what is the percentage of the users in the M23-26 user group?
Evidence: vivo device refers to phone_brand = 'vivo'; percentage = MULTIPLY(DIVIDE(COUNT(phone_brand = 'vivo WHERE group = 'M23-26), COUNT(phone_brand = 'vivo)), 100); M23-26 user group refers to group = 'M23-26';
SQL: SELECT SUM(IIF(T1.`group` = 'M23-26', 1.0, 0)) / COUNT(T1.device_id) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo'

Database: synthea
Question: How many mothers have taken immunization during prenatal visit?
Evidence: expecting mothers can be attributed to encounters.REASONDESCRIPTION = 'Normal pregnancy';
SQL: SELECT COUNT(DISTINCT T2.PATIENT) FROM encounters AS T1 INNER JOIN immunizations AS T2 ON T1.PATIENT = T2.PATIENT WHERE T1.REASONDESCRIPTION = 'Normal pregnancy' AND T1.DATE = T2.DATE

Database: retails
Question: Give the number of Moroccan customers whose account is in debt.
Evidence: account is in debt if c_acctbal < 0; Moroccan customers refer to c_name WHERE n_name = 'MOROCCO';
SQL: SELECT COUNT(T1.c_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'MOROCCO' AND T1.c_acctbal < 0