Database: financial
Question: For accounts in 1993 with statement issued after transaction, list the account ID, district name and district region.
Evidence: Records about district names could be found in A2; A3 contains the information about regions. 'POPLATEK PO OBRATU' stands for issuance after transaction
SQL: SELECT T1.account_id, T2.A2, T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.frequency = 'POPLATEK PO OBRATU' AND STRFTIME('%Y', T1.date)= '1993'

Database: california_schools
Question: How many students from the ages of 5 to 17 are enrolled at the State Special School school in Fremont for the 2014-2015 academic year?
Evidence: State Special School means EdOpsCode = 'SSS'
SQL: SELECT T1.`Enrollment (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.EdOpsCode = 'SSS' AND T2.City = 'Fremont' AND T1.`Academic Year` BETWEEN 2014 AND 2015

Database: toxicology
Question: Calculate the percentage of carcinogenic molecules with triple bonded Hidrogen atoms.
Evidence: hydrogen refers to element = 'h'; label = '+' mean molecules are carcinogenic; triple bond refers to bond_type = '#'; percentage = DIVIDE(SUM(label = '+'), COUNT(molecule_id)) * 100.0 where element = 'h' AND bond_type = '#';
SQL: SELECT CAST(SUM(CASE WHEN T1.label = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T1.molecule_id = T3.molecule_id WHERE T3.bond_type = '#' AND T2.element = 'h'

Database: european_football_2
Question: Which football player has the shortest height?
Evidence: shortest height refers to MIN(height);
SQL: SELECT player_name FROM player ORDER BY height ASC LIMIT 1

Database: toxicology
Question: How many chemical compounds in the database are identified as carcinogenic.
Evidence: label = '+' mean molecules are carcinogenic;
SQL: SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.label = '+'

Database: student_club
Question: Which college is the vice president of the Student_Club from?
Evidence: Vice President is a position of the Student Club
SQL: SELECT T2.college FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position LIKE 'vice president'

Database: toxicology
Question: In the non-carcinogenic molecules, how many contain chlorine atoms?
Evidence: non-carcinogenic molecules refers to label = '-'; chlorine atoms refers to element = 'cl'
SQL: SELECT COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.element = 'cl' AND T1.label = '-'

Database: formula_1
Question: Where can the introduction of the races held on Circuit de Barcelona-Catalunya be found?
Evidence: introduction of races refers to url; Circuit de Barcelona-Catalunya is a name of circuit;
SQL: SELECT DISTINCT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Circuit de Barcelona-Catalunya'

Database: european_football_2
Question: List the football team that has a build up play speed of 31, build up plan dribbling of 53, and build up play passing of 32. Only indicate the short name of the team.
Evidence: build up play speed refers to buildUpPlaySpeed; buildUpPlaySpeed = 31; build up play dribbling refers to buildUpPlayDribbling; buildUpPlayDribbling = 53; build up play passing refers to buildUpPlayPassing; buildUpPlayPassing = 32; short name of the team refers to team_short_name;
SQL: SELECT DISTINCT t1.team_short_name FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.buildUpPlaySpeed = 31 AND t2.buildUpPlayDribbling = 53 AND t2.buildUpPlayPassing = 32

Database: california_schools
Question: If there are any, what are the websites address of the schools with a free meal count of 1,900-2,000 to students aged 5-17? Include the name of the school.
SQL: SELECT T2.Website, T1.`School Name` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Free Meal Count (Ages 5-17)` BETWEEN 1900 AND 2000 AND T2.Website IS NOT NULL

Database: codebase_community
Question: Which post has the highest score? Please give its id and title's name.
Evidence: the highest score refers to MAX(Score); owner's name refers to DisplayName;
SQL: SELECT T1.Id, T2.Title FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId ORDER BY T2.Score DESC LIMIT 1

Database: superhero
Question: Identify the heaviest superhero in DC Comics.
Evidence: heaviest refers to MAX(weight_kg); DC Comics refers to publisher_name = 'DC Comics'; superhero refers to superhero_name;
SQL: SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'DC Comics' ORDER BY T1.weight_kg DESC LIMIT 1

Database: codebase_community
Question: List out the name of badges that users obtained on 7/19/2010 7:39:08 PM.
Evidence: on 7/19/2010 7:39:08 PM refers to Date = '2010-07-19 19:39:08.0'
SQL: SELECT Name FROM badges WHERE Date = '2010-07-19 19:39:08.0'

Database: student_club
Question: What is the ratio between students majored in finance and physics?
Evidence: DIVDE(SUM(major_name = 'Finance'), SUM(major_name = 'Physics'))
SQL: SELECT SUM(CASE WHEN major_name = 'Finance' THEN 1 ELSE 0 END) / SUM(CASE WHEN major_name = 'Physics' THEN 1 ELSE 0 END) AS ratio FROM major

Database: formula_1
Question: List circuits which host 4 f1 races from year 1990 to 2000.
Evidence: from year 1990 to 2000 refers to year(date) between 1990 and 2000;
SQL: SELECT DISTINCT T1.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE STRFTIME('%Y', T2.date) BETWEEN '1990' AND '2000' GROUP BY T1.name HAVING COUNT(T2.raceId) = 4

Database: student_club
Question: Write the full names of students who received funds on the date of 9/9/2019 and include the amount received.
Evidence: full name refers to first_name, last_name, amount of funds received refers to amount, received funds on date refers to date_received
SQL: SELECT DISTINCT T3.first_name, T3.last_name, T4.amount FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T3.member_id = T2.link_to_member INNER JOIN income AS T4 ON T4.link_to_member = T3.member_id WHERE T4.date_received = '2019-09-09'

Database: thrombosis_prediction
Question: For the patients with an abnormal activated partial prothrom bin time, how many of them does not have thrombosis?
Evidence: abnormal activated partial prothrom bin time refers to APTT > 45; does not have thrombosis refers to Thrombosis = 0; Only count ones without repetitive.
SQL: SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE T3.Thrombosis = 0 AND T2.APTT > 45

Database: codebase_community
Question: What is the name of tags used by John Salvatier's?
Evidence: DisplayName = 'John Salvatier';
SQL: SELECT T3.Tags FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T1.DisplayName = 'John Salvatier'

Database: debit_card_specializing
Question: In February 2012, what percentage of customers consumed more than 528.3?
Evidence: February 2012 refers to '201202' in yearmonth.date; The first 4 strings of the Date values in the yearmonth table can represent year; The 5th and 6th string of the date can refer to month.
SQL: SELECT CAST(SUM(IIF(Consumption > 528.3, 1, 0)) AS FLOAT) * 100 / COUNT(CustomerID) FROM yearmonth WHERE Date = '201202'