Database: video_games
Question: Among the games released in 2004, what is the percentage of games on PSP?
Evidence: in 2004 refers to release_year = 2004; on PSP refers to platform_name = 'PSP'; percentage = divide(sum(platform_id where platform_name = 'PSP'), count(platform_id)) * 100% where release_year = 2004
SQL: SELECT CAST(COUNT(CASE WHEN T1.platform_name = 'PSP' THEN T3.game_id ELSE NULL END) AS REAL) * 100 / COUNT(T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T2.release_year = 2004

Database: legislator
Question: Provide the Instagram username of the legislator named Benjamin Hawkins.
Evidence: Instagram username refers to instagram;
SQL: SELECT T1.instagram FROM `social-media` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name = 'Benjamin' AND T2.last_name = 'Hawkins'

Database: software_company
Question: How many of the first 60,000 customers from the place with the highest average income per month have sent a true response to the incentive mailing sent by the marketing department?
Evidence: place with the highest average income per month refers to GEOID where MAX(INCOME_K); RESPONSE = 'true';
SQL: SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID INNER JOIN Demog AS T3 ON T1.GEOID = T3.GEOID WHERE T2.RESPONSE = 'true' ORDER BY T3.INCOME_K DESC LIMIT 1

Database: university
Question: In which nation is Harvard University located?
Evidence: Harvard University refers to university_name = 'Harvard University'; nation refers to country_name
SQL: SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T1.university_name = 'Harvard University'

Database: chicago_crime
Question: Which community area has the highest number of crimes reported on the street?
Evidence: reported on the street refers to location_description = 'STREET'; community area with highest number of crime refers to Max(Count(location_description)); community area refers to community_area_no
SQL: SELECT T1.community_area_no FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no WHERE T2.location_description = 'STREET' GROUP BY T1.community_area_no ORDER BY COUNT(T2.location_description) DESC LIMIT 1

Database: world
Question: List down languages used in Malaysia.
Evidence: Malaysia is a name of country;
SQL: SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Malaysia'

Database: regional_sales
Question: What is the average household income in cities in the state of New Hampshire where there are stores of the type city?
Evidence: "New Hampshire" is the State; average household income = AVG(Household Income)
SQL: SELECT AVG(T2.`Household Income`) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.State = 'New Hampshire' AND T2.Type = 'City'

Database: movie_3
Question: How many customers live in the city of Miyakonojo?
SQL: SELECT COUNT(T3.customer_id) FROM city AS T1 INNER JOIN address AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.city = 'Miyakonojo'

Database: chicago_crime
Question: What is the average number of crimes in a neighborhood in Central Chicago?
Evidence: Central Chicago refers to side = 'Central'; average number = divide(count(report_no), count(community_area_no))
SQL: SELECT CAST(COUNT(T1.report_no) AS REAL) / COUNT(T2.community_area_no) FROM Crime AS T1 INNER JOIN Community_Area AS T2 ON T1.community_area_no = T2.community_area_no WHERE T2.side = 'Central'

Database: cs_semester
Question: Give the full name and capability of students who failed in any courses.
Evidence: full name of students = f_name, l_name; failed refers to grade IS NULL;
SQL: SELECT T2.f_name, T2.l_name, T1.capability FROM RA AS T1 INNER JOIN student AS T2 ON T2.student_id = T1.student_id INNER JOIN registration AS T3 ON T2.student_id = T3.student_id WHERE T3.grade IS NULL OR T3.grade = ''

Database: regional_sales
Question: Compare the total number of orders between customer "Apollo Ltd" and "Pacific Ltd".
Evidence: "Apollo Ltd" and "Pacific Ltd" are both Customer Names; total number of orders refers to COUNT(OrderNumber)
SQL: SELECT SUM(CASE WHEN T2.`Customer Names` = 'Apollo Ltd' THEN 1 ELSE 0 END), SUM(CASE WHEN T2.`Customer Names` = 'Pacific Ltd' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID

Database: sales
Question: Among the products that have price ranges from 100 to 150, what is the customer ID and sales ID of the product with a quantity lower than 25?
Evidence: price ranges from 100 to 150 refers to Price BETWEEN 100 AND 150; quantity lower than 25 refers to Quantity < 25;
SQL: SELECT T2.CustomerID, T2.SalesID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price BETWEEN 100 AND 150 AND T2.Quantity < 25

Database: synthea
Question: What is the care plan for the patient with social security number 999-15-3685?
Evidence: social security number refers to ssn; ssn = '999-15-3685';
SQL: SELECT DISTINCT T1.DESCRIPTION FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.ssn = '999-15-3685'

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

Database: shakespeare
Question: Other than "stage directions", what is the name of the character that appeared 5 times in "the sea-coast"?
Evidence: Other than "stage directions" refers to CharName ! = '(stage directions)'; name of the character refers to CharName; appeared 5 times in "the sea-coast" refers to chapters.Description = 'The sea-coast.' and count(character_id) = 5
SQL: SELECT T.CharName FROM ( SELECT T3.CharName, COUNT(T3.id) AS num FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id INNER JOIN characters AS T3 ON T1.character_id = T3.id WHERE T2.Description = 'The sea-coast.' AND T3.CharName != '(stage directions)' AND T1.chapter_id = 18709 GROUP BY T3.id, T3.CharName ) AS T WHERE T.num = 5

Database: authors
Question: What is the homepage address for paper "Energy-efficiency bounds for noise-tolerant dynamic circuits"?
Evidence: "Energy-efficiency bounds for noise-tolerant dynamic circuits" is the Title of paper
SQL: SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Energy-efficiency bounds for noise-tolerant dynamic circuits'

Database: world
Question: What is the year of independence of Brunei?
Evidence: year of independence refers to IndepYear; Brunei is a name of country;
SQL: SELECT IndepYear FROM Country WHERE Name = 'Brunei'

Database: codebase_comments
Question: List all the solutions of repositories with the Forks higher than half of the watchers.
Evidence: solutions refers to Solution.Id; forks higher than half of the watchers refers tto Forks>(Watchers/2);;
SQL: SELECT DISTINCT T2.Id FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks > T1.Watchers / 2