Database: superhero
Question: Find the ratio between male superheroes and female superheroes.
Evidence: ratio = DIVIDE(SUM(gender_id = 1) / SUM(gender_id = 2)); male superheroes refers to gender = 'Female'; female superheroes refers to gender = 'Male';
SQL: SELECT CAST(COUNT(CASE WHEN T2.gender = 'Male' THEN T1.id ELSE NULL END) AS REAL) / COUNT(CASE WHEN T2.gender = 'Female' THEN T1.id ELSE NULL END) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id

Database: codebase_community
Question: State the number of views of users who obtained the badge 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 T1.Views FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Date = '2010-07-19 19:39:08.0'

Database: formula_1
Question: Name the races along with its circuit name and location for f1 races hosted in September 2005.
Evidence: in September 2005 refers to MONTH(date) = 9 and YEAR(date) = 2005
SQL: SELECT DISTINCT T2.name, T1.name, T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2005 AND STRFTIME('%m', T2.date) = '09'

Database: codebase_community
Question: What is the display name of the user who has obtained the most number of badges?
Evidence: who obtained the most number of badges refers to UserID with Max(Count(Id))
SQL: SELECT T2.DisplayName FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id GROUP BY T2.DisplayName ORDER BY COUNT(T1.Id) DESC LIMIT 1

Database: toxicology
Question: How much of the hydrogen in molecule TR206 is accounted for? Please provide your answer as a percentage with four decimal places.
Evidence: hydrogen refers to element = 'h'; TR206 is the molecule id; percentage = DIVIDE(SUM(element = 'h'), COUNT(atom_id)) as percent where molecule_id = 'TR206'
SQL: SELECT ROUND(CAST(COUNT(CASE WHEN T.element = 'h' THEN T.atom_id ELSE NULL END) AS REAL) * 100 / COUNT(T.atom_id),4) FROM atom AS T WHERE T.molecule_id = 'TR206'

Database: formula_1
Question: Please give the names of the races held on the circuits in Spain.
Evidence: Spain is a name of country;
SQL: SELECT DISTINCT T2.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'Spain'

Database: thrombosis_prediction
Question: Among the patients who has a normal level of anti-centromere and a normal level of anti-SSB, how many of them are male?
Evidence: normal level of anti-centromere refers to CENTROMEA IN('-', '+-'); normal level of anti-SSB refers to SSB IN('-', '+-'); male refers to Sex = 'M'; Should consider DISTINCT in the final result;
SQL: SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CENTROMEA IN ('negative', '0') AND T2.SSB IN ('negative', '0') AND T1.SEX = 'M'

Database: superhero
Question: Which hero was the fastest?
Evidence: which hero refers to superhero_name; fastest refers to MAX(attribute_value) WHERE attribute_name = 'Speed';
SQL: SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T3.attribute_name = 'Speed' ORDER BY T2.attribute_value DESC LIMIT 1

Database: debit_card_specializing
Question: Which gas station has the highest amount of revenue?
SQL: SELECT GasStationID FROM transactions_1k GROUP BY GasStationID ORDER BY SUM(Price) DESC LIMIT 1

Database: toxicology
Question: Identify all connected atoms with a triple bond.
Evidence: triple bond refers to bond_type = '#';
SQL: SELECT T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.bond_type = '#'

Database: superhero
Question: Calculate the average height for each superhero.
Evidence: average = DIVIDE(SUM(height_cm), COUNT(all heros));
SQL: SELECT CAST(SUM(height_cm) AS REAL) / COUNT(id) FROM superhero

Database: codebase_community
Question: How many users obtained the "Announcer" badge?
Evidence: "Announcer" is the Name of badge; user refers to UserId
SQL: SELECT COUNT(id) FROM badges WHERE Name = 'Announcer'

Database: european_football_2
Question: What percentage is Landon Donovan's overall rating higher than Jordan Bowery on 2013/7/12?
Evidence: Landon Donovan's refers to player_name = 'Landon Donovan'; Jordan Bowery refers to player_name = 'Jordan Bowery'; percentage refers to DIVIDE(SUBTRACT(player_name = 'Landon Donovan' overall_rating; player_name = 'Jordan Bowery' overall_rating), player_name = 'Landon Donovan' overall_rating)*100
SQL: SELECT (SUM(CASE WHEN t1.player_name = 'Landon Donovan' THEN t2.overall_rating ELSE 0 END) * 1.0 - SUM(CASE WHEN t1.player_name = 'Jordan Bowery' THEN t2.overall_rating ELSE 0 END)) * 100 / SUM(CASE WHEN t1.player_name = 'Landon Donovan' THEN t2.overall_rating ELSE 0 END) LvsJ_percent FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2013-07-12'

Database: financial
Question: How many percent of 'Gold' cards were issued prior to 1998?
Evidence: Percent of Gold = [ count(type = 'gold' and issued date < 1998) / count(all cards)] * 100%
SQL: SELECT CAST(SUM(type = 'gold' AND STRFTIME('%Y', issued) < '1998') AS REAL) * 100 / COUNT(card_id) FROM card

Database: student_club
Question: In the College of Agriculture and Applied Sciences, how many majors are under the department of School of Applied Sciences, Technology and Education?
SQL: SELECT COUNT(major_id) FROM major WHERE department = 'School of Applied Sciences, Technology and Education' AND college = 'College of Agriculture and Applied Sciences'

Database: formula_1
Question: What is the constructor reference name of the champion in the 2009 Singapore Grand Prix? Please give its website.
Evidence: the time of the champion shows in the format of "minutes: seconds.millionsecond" in which Max(time); constructor reference name refers to constructorRef; website refers to url
SQL: SELECT T3.constructorRef, T3.url FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN constructors AS T3 on T1.constructorId = T3.constructorId WHERE T2.name = 'Singapore Grand Prix' AND T2.year = 2009 AND T1.time LIKE '_:%:__.___'

Database: toxicology
Question: Does bond id TR001_1_8 have both element of chlorine and carbon?
Evidence: chlorine refers to element = 'cl'; carbon refers to element = 'c'
SQL: SELECT T2.bond_id, T2.atom_id2, T1.element AS flag_have_CaCl FROM atom AS T1 INNER JOIN connected AS T2 ON T2.atom_id = T1.atom_id WHERE T2.bond_id = 'TR001_1_8' AND (T1.element = 'c1' OR T1.element = 'c')

Database: student_club
Question: Which students manage to generate the highest income. State his/her full name along with the income source.
Evidence: name of students means the full name; full name refers to first_name, last_name; generate the highest income refers to MAX(income.amount);
SQL: SELECT T1.first_name, T1.last_name, T2.source FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member GROUP BY T1.first_name, T1.last_name, T2.source ORDER BY SUM(T2.amount) DESC LIMIT 1

Database: debit_card_specializing
Question: For the customer who paid 124.05 in 2012/8/24, how much did he/she spend during the January of 2012? And what is the date and expenses exactly?
Evidence: '2012/8/24' can be represented by '2012-08-24'; expense and the consumption has the similar meaning.
SQL: SELECT T1.CustomerID, T2.Date, T2.Consumption FROM transactions_1k AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '2012-08-24' AND T1.Price = 124.05 AND T2.Date = '201201'