Database: student_club
Question: For all the club members from "Business" major, how many of them wear medium size t-shirt?
Evidence: 'Business' is a major name; wear medium size t-shirt refers to t_shirt_size = 'Medium'
SQL: SELECT COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.major_name = 'Business' AND T1.t_shirt_size = 'Medium'

Database: financial
Question: How many 'classic' cards are eligible for loan?
Evidence: when the account type = 'OWNER', it's eligible for loan
SQL: SELECT COUNT(T1.card_id) FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type = 'classic' AND T2.type = 'OWNER'

Database: superhero
Question: How many superheroes did DC Comics publish?
Evidence: superheroes that DC Comics published refers to publisher_name = 'DC Comics'
SQL: SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'DC Comics'

Database: card_games
Question: What percentage of Japanese translated sets are expansion sets?
Evidence: Japanese translated refers to language = 'Japanese'; expansion sets refers to type = 'expansion'; percentage = DIVIDE(COUNT(language = 'Japanese'),COUNT(language))*100
SQL: SELECT CAST(SUM(CASE WHEN T2.language = 'Japanese' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.type = 'expansion'

Database: superhero
Question: How many superheroes are published by Marvel Comics?
Evidence: published by Marvel Comics refers to publisher_name = 'Marvel Comics'
SQL: SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Marvel Comics'

Database: superhero
Question: List the heroes' names whose eyes and hair colours are both black.
Evidence: heroes' names refers to superhero_name; eyes and hair colours are both black refers to eye_colour_id AND hair_colour_id WHERE colour.colour = 'Black';
SQL: SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id AND T1.hair_colour_id = T2.id WHERE T2.colour = 'Black'

Database: student_club
Question: What department offers the major that Pierce and Guidi took?
SQL: SELECT T2.department FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.last_name = 'Pierce' OR T1.last_name = 'Guidi'

Database: california_schools
Question: Of all the schools with a mailing state address in California, how many are active in San Joaquin city?
SQL: SELECT COUNT(CDSCode) FROM schools WHERE City = 'San Joaquin' AND MailState = 'CA' AND StatusType = 'Active'

Database: student_club
Question: List emails of people who paid more than 20 dollars from 9/10/2019 to 11/19/2019.
Evidence: expense_date BETWEEN '2019-09-10' and '2019-11-19'; cost > 20
SQL: SELECT DISTINCT T1.email FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE date(SUBSTR(T2.expense_date, 1, 10)) BETWEEN '2019-09-10' AND '2019-11-19' AND T2.cost > 20

Database: student_club
Question: Find the name and date of events with expenses for pizza that were more than fifty dollars but less than a hundred dollars.
Evidence: name of event refers to event_name; date of event refers to event_date; expenses for pizza refers to expense_description = 'Pizza' where cost > 50 and cost < 100
SQL: SELECT T1.event_name, T1.event_date FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T3.expense_description = 'Pizza' AND T3.cost > 50 AND T3.cost < 100

Database: superhero
Question: What is the superpower of hero ID 56?
Evidence: superpower refers to hero_power
SQL: SELECT T2.power_name FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T1.hero_id = 56

Database: superhero
Question: Give the race of the blue-haired male superhero.
Evidence: blue-haired refers to colour.colour = 'blue' WHERE hair_colour_id = colour.id; male refers to gender = 'male';
SQL: SELECT T3.race FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.hair_colour_id = T2.id INNER JOIN race AS T3 ON T1.race_id = T3.id INNER JOIN gender AS T4 ON T1.gender_id = T4.id WHERE T2.colour = 'Blue' AND T4.gender = 'Male'

Database: formula_1
Question: How many points did Lewis Hamilton get in total in all the Formula_1 races he participated?
SQL: SELECT SUM(T2.points) FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton'

Database: formula_1
Question: Give the coordinate position for Abu Dhabi Grand Prix.
Evidence: coordinate position/location refers to lat, lng; Abu Dhabi Grand Prix refers to races.name = 'Abu Dhabi Grand Prix'
SQL: SELECT DISTINCT T1.lat, T1.lng FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Abu Dhabi Grand Prix'

Database: formula_1
Question: What is the annual average number of races held during the first 10 years of the 21st century?
Evidence: races in date between '2000-01-01' and '2010-12-31'
SQL: SELECT CAST(SUM(CASE WHEN year BETWEEN 2000 AND 2010 THEN 1 ELSE 0 END) AS REAL) / 10 FROM races WHERE date BETWEEN '2000-01-01' AND '2010-12-31'

Database: thrombosis_prediction
Question: When is the birthday of the oldest patient whose blood glucose is abnormal?
Evidence: oldest patient refers to MIN(Birthday); blood glucose is abnormal refers to GLU > 180;
SQL: SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GLU > 180 ORDER BY T1.Birthday ASC LIMIT 1

Database: superhero
Question: Calculate the percentage of superheroes with blue eyes.
Evidence: percentage = MULTIPLY(DIVIDE(SUM(superhero_name WHERE color = 'Blue'), COUNT(superhero_name)), 100.0); blue eyes refers to color = 'Blue' and color.id =  eye_colour_id = 7;
SQL: SELECT CAST(COUNT(CASE WHEN T2.colour = 'Blue' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id

Database: toxicology
Question: Identify whether the molecule that contains atom TR001_1 is carcinogenic.
Evidence: label = '+' mean molecules are carcinogenic;
SQL: SELECT T2.label AS flag_carcinogenic FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.atom_id = 'TR001_1'

Database: thrombosis_prediction
Question: Please list the patient's ID if he or she has an abnormal level of red blood cell and is followed at the outpatient clinic.
Evidence: RBC < = 3.5 or RBC > = 6.0 means the patient has an abnormal level of red blood cell; 3.5 < RBC < 6.0 means the patient has a normal level of red blood cell; followed at the outpatient clinic refers to Admission = '-';
SQL: SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.RBC <= 3.5 OR T2.RBC >= 6) AND T1.Admission = '-'

Database: toxicology
Question: Please list top five molecules that have double bonds in alphabetical order.
Evidence: double bond refers to bond_type = ' = ';
SQL: SELECT DISTINCT T.molecule_id FROM bond AS T WHERE T.bond_type = '=' ORDER BY T.molecule_id LIMIT 5

Database: formula_1
Question: What is the fastest lap number of the champion in 2009?
Evidence: in 2009 refers to year = 2009; Only the time of the champion shows in the format of "hour: minutes: seconds.millionsecond"
SQL: SELECT T1.fastestLap FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.year = 2009 AND T1.time LIKE '_:%:__.___'

Database: debit_card_specializing
Question: Which country has more "value for money" gas stations? Please give a total number of "value for money" gas stations in each country.
SQL: SELECT Country , ( SELECT COUNT(GasStationID) FROM gasstations WHERE Segment = 'Value for money' ) FROM gasstations WHERE Segment = 'Value for money' GROUP BY Country ORDER BY COUNT(GasStationID) DESC LIMIT 1