Database: toxicology
Question: What is the ratio of Hydrogen elements in molecule ID TR006? List the ratio with its label.
Evidence: hydrogen refers to element = 'h'; ratio = DIVIDE(SUM(element = 'h'), count(element)) where molecule_id = 'TR006' ; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
SQL: WITH SubQuery AS (SELECT DISTINCT T1.atom_id, T1.element, T1.molecule_id, T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.molecule_id = 'TR006') SELECT CAST(COUNT(CASE WHEN element = 'h' THEN atom_id ELSE NULL END) AS REAL) / (CASE WHEN COUNT(atom_id) = 0 THEN NULL ELSE COUNT(atom_id) END) AS ratio, label FROM SubQuery GROUP BY label

Database: student_club
Question: What college offers the major that Tyler Hewitt took?
SQL: SELECT T2.college FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.first_name = 'Tyler' AND T1.last_name = 'Hewitt'

Database: thrombosis_prediction
Question: Among the patients whose level of Hematoclit isn't normal, which patient has the highest anti-Cardiolipin antibody concentration? Please list his or her ID.
Evidence: Hematoclit is normal refers to 29 < N < 52; highest anti-Cardiolipin antibody concentration refers to MAX(`aCL IgA`);
SQL: SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID INNER JOIN Laboratory AS T3 on T1.ID = T3.ID WHERE (T3.HCT >= 52 OR T3.HCT <= 29) ORDER BY T2.`aCL IgA` DESC LIMIT 1

Database: california_schools
Question: Which cities have the top 5 lowest enrollment number for students in grades 1 through 12?
Evidence: K-12 refers to students in grades 1 through 12.
SQL: SELECT T2.City FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode GROUP BY T2.City ORDER BY SUM(T1.`Enrollment (K-12)`) ASC LIMIT 5

Database: superhero
Question: How many heroes have the highest attribute value in strength?
Evidence: highest attribute value in strength refers to MAX(attribute_value) WHERE attribute_name = 'Strength';
SQL: SELECT COUNT(T1.hero_id) FROM hero_attribute AS T1 INNER JOIN attribute AS T2 ON T1.attribute_id = T2.id WHERE T2.attribute_name = 'Strength' AND T1.attribute_value = ( SELECT MAX(attribute_value) FROM hero_attribute )

Database: codebase_community
Question: How many users are awarded with supporter badge during year 2011?
Evidence: "Supporter" is the Name of badge; in year 2011 refers to year(Date) = 2011
SQL: SELECT COUNT(Id) FROM badges WHERE STRFTIME('%Y', Date) = '2011' AND Name = 'Supporter'

Database: superhero
Question: What is the colour of Apocalypse's skin?
Evidence: Apocalypse refers to superhero_name = 'Apocalypse'; colour of skin refers to colour where skin_colour_id = colour.id
SQL: SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.skin_colour_id = T2.id WHERE T1.superhero_name = 'Apocalypse'

Database: student_club
Question: Provide the number of events attended by Luisa Guidi. What is her major?
Evidence: major refers to major_name;
SQL: SELECT COUNT(T3.link_to_event), T1.major_name FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major INNER JOIN attendance AS T3 ON T2.member_id = T3.link_to_member WHERE T2.first_name = 'Luisa' AND T2.last_name = 'Guidi'

Database: formula_1
Question: In the race No. 45, for the driver who had the Q3 time as 0:01:33, what is his abbreviated code?
Evidence: race number refers to raceId; had the Q3 time as 0:0M:SS refers to q3 LIKE 'M:SS%'
SQL: SELECT T2.code FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 45 AND T1.q3 LIKE '1:33%'

Database: european_football_2
Question: What are Alexis Blin's sprint speed, agility, and acceleration scores?
Evidence: Alexis Blin's refers to player_name = 'Alexis Blin'
SQL: SELECT sprint_speed, agility, acceleration FROM Player_Attributes WHERE player_api_id IN ( SELECT player_api_id FROM Player WHERE player_name = 'Alexis Blin' )

Database: superhero
Question: Give the publisher ID of Star Trek.
Evidence: Star Trek is the publisher_name;
SQL: SELECT id FROM publisher WHERE publisher_name = 'Star Trek'

Database: financial
Question: Between 1/1/1995 and 12/31/1997, how many loans in the amount of at least 250,000 per account that chose monthly statement issuance were approved?
Evidence: Frequency = 'POPLATEK MESICNE' stands for monthly issurance
SQL: SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.date BETWEEN '1995-01-01' AND '1997-12-31' AND T1.frequency = 'POPLATEK MESICNE' AND T2.amount >= 250000

Database: formula_1
Question: What is the full name and date of birth of Austrian drivers born between 1981 and 1991?
Evidence: Full name refers to forname, surname; Date of birth refers to dob; year(dob) BETWEEN '1981' AND '1991'; Austrian is a nationality
SQL: SELECT forename, surname, dob FROM drivers WHERE nationality = 'Austrian' AND STRFTIME('%Y', dob) BETWEEN '1981' AND '1991'

Database: financial
Question: List the account IDs with monthly issuance of statements.
Evidence: 'POPLATEK MESICNE' stands for monthly issuance
SQL: SELECT account_id FROM account WHERE Frequency = 'POPLATEK MESICNE'

Database: financial
Question: What is the average amount of loan which are still on running contract with statement issuance after each transaction?
Evidence: status = 'C' stands for running contract, OK so far; status = 'D' stands for running contract, client in debt. 'POPLATEK PO OBRATU' stands for issuance after transaction
SQL: SELECT AVG(T2.amount) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.status IN ('C', 'D') AND T1.frequency = 'POPLATEK PO OBRATU'

Database: european_football_2
Question: Calculate the total home team goal scored by players whose age are 30 years old and below.
Evidence: age are 30 years old and below refers to SUBTRACT(datetime(CURRENT_TIMESTAMP,'localtime'), datetime(birthday) < 31)
SQL: SELECT SUM(t2.home_team_goal) FROM Player AS t1 INNER JOIN match AS t2 ON t1.player_api_id = t2.away_player_1 WHERE datetime(CURRENT_TIMESTAMP, 'localtime') - datetime(T1.birthday) < 31

Database: california_schools
Question: In Los Angeles how many schools have more than 500 free meals but less than 700 free or reduced price meals for K-12?
SQL: SELECT COUNT(CDSCode) FROM frpm WHERE `County Name` = 'Los Angeles' AND `Free Meal Count (K-12)` > 500 AND `FRPM Count (K-12)`< 700

Database: codebase_community
Question: Please list all display names of users who are adults.
Evidence: adults refer to users where Age BETWEEN 19 and 65;
SQL: SELECT DisplayName FROM users WHERE Age BETWEEN 19 AND 65

Database: formula_1
Question: State the race and year of race in which Michael Schumacher had his fastest lap.
Evidence: fastest lap refers to min(milliseconds); Alex Yoong refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname;
SQL: SELECT T1.name, T1.year FROM races AS T1 INNER JOIN lapTimes AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Michael' AND T3.surname = 'Schumacher' ORDER BY T2.milliseconds ASC LIMIT 1

Database: formula_1
Question: In which country can I find the circuit with the highest altitude?
Evidence: highest altitude refers to max(alt)
SQL: SELECT country FROM circuits ORDER BY alt DESC LIMIT 1

Database: thrombosis_prediction
Question: Was the patient a man or a women whose ALT glutamic pylvic transaminase status got 9 on 1992-6-12?
Evidence: man refers to SEX = 'M'; women refers to SEX = 'F'; ALT glutamic pylvic transaminase status got 9 GPT = '9'; 1992/6/12 refers to Date = '1992-06-12'
SQL: SELECT T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT = 9.0 AND T2.Date = '1992-06-12'