Database: movie
Question: Who was the actor that played in the movie "Batman" with the longest screentime?
Evidence: movie "Batman" refers to Title = 'Batman'; longest screentime refers to max(screentime)
SQL: SELECT T2.Name FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID INNER JOIN movie AS T3 ON T3.MovieID = T1.MovieID WHERE T3.Title = 'Batman' ORDER BY T1.screentime DESC LIMIT 1

Database: synthea
Question: Provide the full names of patients who have been taking Penicillin V Potassium 250 MG since 1948.
Evidence: full names = first, last; Penicillin V Potassium 250 MG refers to medications.DESCRIPTION = 'Penicillin V Potassium 250 MG'; since 1948 refers to substr(medications.START, 1, 4) > = '1948';
SQL: SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Penicillin V Potassium 250 MG' AND strftime('%Y', T2.START) >= '1948'

Database: language_corpus
Question: Indicate on how many different pages the word ripoll appears.
Evidence: This is not;
SQL: SELECT T3.page FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'ripoll'

Database: donor
Question: Please list the donation messages of the donations for the projects created by a teacher working in a public magnet school in Brooklyn.
Evidence: school in Brooklyn refers to school_city = 'Brooklyn'; public magnet refers to school_magnet = 't';
SQL: SELECT T2.donation_message FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.school_city = 'Brooklyn' AND T1.school_magnet = 't'

Database: airline
Question: Among the flights operated by American Airlines Inc. on 2018/8/1, how many of them were cancelled?
Evidence: American Airlines Inc. refers to Description = 'American Airlines Inc.: AA'; on 2018/8/1 refers to FL_DATE = '2018/8/1'; cancelled refers to CANCELLED = 1;
SQL: SELECT SUM(CASE WHEN T2.CANCELLED = 1 THEN 1 ELSE 0 END) AS count FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T2.FL_DATE = '2018/8/1' AND T3.Description = 'American Airlines Inc.: AA'

Database: shipping
Question: How many cities are in Connecticut?
Evidence: "Connecticut" is the state
SQL: SELECT COUNT(*) FROM city WHERE state = 'Connecticut'

Database: simpson_episodes
Question: List the categories for which Bonita Pietila was given credit and her role in creating the episodes.
SQL: SELECT DISTINCT category, role FROM Credit WHERE person = 'Bonita Pietila';

Database: cs_semester
Question: Which student has the highest gpa? Give the full name.
Evidence: GPA is an abbreviated name of Grade Point Average where highest GPA = MAX(gpa); full name refers to f_name and l_name;
SQL: SELECT f_name, l_name FROM student WHERE gpa = ( SELECT MAX(gpa) FROM student )

Database: bike_share_1
Question: Please list trips id started on the hottest day.
Evidence: started refers to start_date; the hottest day refers to max_temperature_f;
SQL: SELECT T1.id FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code ORDER BY T2.max_temperature_f DESC LIMIT 1

Database: computer_student
Question: How many professors teaches no more than two high-level or harder undergraduate courses?
Evidence: professors refers to taughtBy.p_id; high-level or harder undergraduate courses  refers to courseLevel = 'Level_400' ; no more than two refers to count(taughtBy.course_id) < = 2
SQL: SELECT COUNT(*) FROM ( SELECT COUNT(T2.p_id) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_400' GROUP BY T2.p_id HAVING COUNT(DISTINCT T1.course_id) <= 2 )

Database: movie_platform
Question: Which of the film released in 2008 scored the highest?
Evidence: film released in 2008 refers to movie_release_year = 2008; scored the highest refers to Max(rating_score); film refers to movie;
SQL: SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year = 2008 ORDER BY T1.rating_score DESC LIMIT 1

Database: retail_complains
Question: Calculate the average number of complaints received from New Bedford each year which are closed with explanation.
Evidence: average = AVG("Complaint ID"); New Bedford refers to city = 'New Bedford'; closed with explanation refers to Company response to consumer = 'Closed with explanation';
SQL: SELECT STRFTIME('%Y', T3.`Date received`) , CAST(SUM(CASE WHEN T3.`Company response to consumer` = 'Closed with explanation' THEN 1 ELSE 0 END) AS REAL) / COUNT(T3.`Complaint ID`) AS average 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.city = 'New Bedford' GROUP BY strftime('%Y', T3.`Date received`)

Database: university
Question: For the University of Southampton in 2015, on which criteria did it score the best?
Evidence: University of Southampton refers to university_name = 'University of Southampton'; in 2015 refers to year = 2015; score the best refers to MAX(score); which criteria refers to criteria_name
SQL: SELECT T1.criteria_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T3.university_name = 'University of Southampton' AND T2.year = 2015 ORDER BY T2.score DESC LIMIT 1

Database: donor
Question: What are the vendors of the book-type projects? List them with the project ID.
Evidence: book-type projects refers to project_resource_type = 'Books'
SQL: SELECT DISTINCT vendorid, projectid FROM resources WHERE project_resource_type = 'Books'

Database: world
Question: Give the population of the country where Queimados city belongs.
SQL: SELECT T2.Population FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'Queimados'

Database: retail_complains
Question: Which product received the most complaints from elder clients?
Evidence: most complaints refers to max(client_id); elder client refers to age > 65
SQL: SELECT T2.Product FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.age > 65 ORDER BY T1.client_id DESC LIMIT 1

Database: computer_student
Question: How many students are advised to teach by a professor teaching basic or medium undergraduate courses?
Evidence: students refers to advisedBy.p_id; professor refers to p_id_dummy and taughtBy.p_id and professor = 1; basic or medium undergraduate courses refers to courseLevel = 'Level_300'
SQL: SELECT COUNT(DISTINCT T4.p_id) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T3.course_id = T2.course_id INNER JOIN advisedBy AS T4 ON T4.p_id = T1.p_id WHERE T1.professor = 1 AND T3.courseLevel = 'Level_300'

Database: law_episode
Question: Who played the role of a teleplay in the episode that won "Best Television Episode"?
Evidence: the role of a teleplay refers to role = 'teleplay'; won refers to result = 'Winner'; "Best Television Episode" refers to award = 'Best Television Episode'
SQL: SELECT T2.name FROM Award AS T1 INNER JOIN Person AS T2 ON T1.person_id = T2.person_id WHERE T1.result = 'Winner' AND T1.award = 'Best Television Episode'

Database: soccer_2016
Question: How many matches were played in Season 7?
Evidence: Season 7 refers to Season_Id = 7
SQL: SELECT COUNT(Match_Id) FROM `Match` WHERE Season_Id = 7

Database: food_inspection_2
Question: List the point IDs and fines of the inspections done on 7th August 2010.
Evidence: on 7th August 2010 refers to inspection_date = '2010-08-07'
SQL: SELECT T2.point_id, T2.fine FROM inspection AS T1 INNER JOIN violation AS T2 ON T1.inspection_id = T2.inspection_id WHERE T1.inspection_date = '2010-08-07'