Database: professional_basketball
Question: What is the name of the team with the highest home lost rate?
Evidence: highest home lost rate = Max(Divide(homelost, Sum(homeWon, homeLost)))
SQL: SELECT name FROM teams ORDER BY CAST(homeWon AS REAL) / (homeWon + homeLost) DESC LIMIT 1

Database: music_platform_2
Question: List all the podcasts reviewed by a reviewer who has a review titled "Inspired & On Fire!".
Evidence: "Inspired & On Fire" refers to title of review
SQL: SELECT T1.title FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'Inspired & On Fire!'

Database: menu
Question: What is the menu id of the menu sponsored by Occidental and Oriental Steamship Company with the highest number of pages?
Evidence: sponsored by Occidental and Oriental Steamship Company refers to sponsor = 'OCCIDENTAL & ORIENTAL STEAMSHIP COMPANY'; highest number of pages refers to MAX(COUNT(page_number));
SQL: SELECT T2.menu_id FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T1.sponsor = 'OCCIDENTAL & ORIENTAL STEAMSHIP COMPANY' GROUP BY T2.menu_id ORDER BY COUNT(T2.page_number) DESC LIMIT 1

Database: shakespeare
Question: Which work is the character Lord Abergavenny from? Please give its short or abbreviated title.
Evidence: Lord Abergavenny refers to CharName = 'Lord Abergavenny'; short or abbreviated title refers to Title
SQL: SELECT DISTINCT T1.Title FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T4.CharName = 'Lord Abergavenny'

Database: restaurant
Question: Identify all restaurants in Contra Costa County by id.
SQL: SELECT T1.id_restaurant FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'contra costa county'

Database: movies_4
Question: List down the movies produced by Lucasfilm.
Evidence: movies refers to title; produced by Lucasfil refers to company_name = 'Lucasfilm'
SQL: SELECT T3.title FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Lucasfilm'

Database: social_media
Question: Tweets that were posted from Brazil are in what languague?
Evidence: "Brazil" is the Country; language refers to Lang
SQL: SELECT DISTINCT T1.Lang FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.Country = 'Brazil'

Database: retail_world
Question: List all the territories where Laura Callahan is in charge.
Evidence: territories refers to TerritoryDescription; Laura Callahan is the full name of an employee; full name refers to FirstName, LastName
SQL: SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.FirstName = 'Laura' AND T1.LastName = 'Callahan'

Database: public_review_platform
Question: What is the average year needed by a user with uber fans to become an elite user?
Evidence: AVG(user_yelping_since_year) where user_fans = 'uber';
SQL: SELECT CAST(SUM(T2.year_id - T1.user_yelping_since_year) AS REAL) / COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id WHERE T1.user_fans = 'Uber'

Database: synthea
Question: How many times was Elly Koss given a care plan between 1/11/2009 and 10/23/2010?
Evidence: between 1/11/2009 and 10/23/2010 refers to careplans.START between '2009-11-1' and '2010-10-23';
SQL: SELECT COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.START BETWEEN '2009-01-11' AND '2010-10-23'

Database: shakespeare
Question: List down any 5 titles in the history genre.
Evidence: in the history genre refers to GenreType = 'History'
SQL: SELECT Title FROM works WHERE GenreType = 'History' LIMIT 5

Database: car_retails
Question: How many kinds of products did order No. 10252 contain?
Evidence: Products refer to productCode;
SQL: SELECT COUNT(t.productCode) FROM orderdetails t WHERE t.orderNumber = '10252'

Database: public_review_platform
Question: How many more "Chinese" than "Filipino" Yelp businesses?
Evidence: Chinese refers to category_name = 'Chinese'; Filipino refers to category_name = 'Filipino'; how many more = SUBTRACT(SUM(category_name = 'Chinese'), SUM(category_name = 'Filipino'));
SQL: SELECT SUM(CASE WHEN T1.category_name LIKE 'Chinese' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.category_name LIKE 'Filipino' THEN 1 ELSE 0 END) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id

Database: student_loan
Question: What is the gender of student1000?
Evidence: student name appear in Male table means student is a male, student does not appear in Male table means student is a female
SQL: SELECT IIF(T.result = 0, 'female', 'male') AS re FROM ( SELECT COUNT(name) AS result FROM male WHERE name = 'studenT1000' ) T

Database: synthea
Question: Provide the number of encounters for Major D'Amore.
SQL: SELECT COUNT(T2.ID) FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Major' AND T1.last = 'D''Amore'

Database: olympics
Question: How many Summer games were held in Stockholm?
Evidence: Summer games refer to id where season = 'Summer'; in Stockholm refers to city_name = 'Stockholm';
SQL: SELECT COUNT(T3.id) FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'Stockholm' AND T3.season = 'Summer'

Database: image_and_language
Question: What are the captions of all the self-relation relationship prediction classes?
Evidence: self-relation relationship refers to OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID and PRED_CLASS; captions of prediction classes refers to PRED_CLASS
SQL: SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN pred_classes AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.OBJ1_SAMPLE_ID = T1.OBJ2_SAMPLE_ID GROUP BY T2.PRED_CLASS

Database: simpson_episodes
Question: List all keywords associated with the episode 'Take My Life, Please'.
Evidence: episode 'Take My Life, Please' refers to title =   'Take My Life, Please'
SQL: SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Take My Life, Please';

Database: food_inspection_2
Question: What is the full name of the employee who was responsible for the most inspection in March 2016?
Evidence: full name refers to first_name, last_name; the most inspection refers to max(count(employee_id)); in March 2016 refers to inspection_date like '2016-03%'
SQL: SELECT T3.first_name, T3.last_name FROM ( SELECT T1.employee_id, COUNT(T1.inspection_id) FROM inspection AS T1 WHERE strftime('%Y-%m', T1.inspection_date) = '2016-03' GROUP BY T1.employee_id ORDER BY COUNT(T1.inspection_id) DESC LIMIT 1 ) AS T2 INNER JOIN employee AS T3 ON T2.employee_id = T3.employee_id

Database: talkingdata
Question: Identify all installed and activated apps by their id.
Evidence: installed refers to is_installed = 1; activated refers to is_active = 1; id refers to app_id;
SQL: SELECT app_id FROM app_events WHERE is_active = 1 AND is_installed = 1

Database: student_loan
Question: How many male students join more than one organization?
Evidence: more than one organization refers to COUNT(organ) > 1
SQL: SELECT COUNT(T.a) FROM ( SELECT COUNT(DISTINCT T1.name) AS a, COUNT(T2.organ) AS num FROM male AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name GROUP BY T1.name ) T WHERE T.num > 1