Database: debit_card_specializing
Question: Which SME customer consumed the least in June 2012?
Evidence: June 2012 refers to yearmonth.date = '201206'
SQL: SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201206' AND T1.Segment = 'SME' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) ASC LIMIT 1

Database: superhero
Question: Between DC and Marvel Comics, which publisher has published more superheroes? Find the difference in the number of superheroes they have published.
Evidence: DC refers to publisher_name = 'DC Comics'; Marvel Comics refers to publisher_name = 'Marvel Comics'; calculation = SUBTRACT(SUM(publisher_name = 'Marvel Comics'), SUM(publisher_name = 'DC Comics'))
SQL: SELECT SUM(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.publisher_name = 'DC Comics' THEN 1 ELSE 0 END) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id

Database: student_club
Question: Mention the category of events which were held at MU 215.
Evidence: held at MU 215 refers to location = 'MU 215'
SQL: SELECT T2.category FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.location = 'MU 215'

Database: toxicology
Question: List out the atom id that belongs to the TR346 molecule and how many bond type can be created by this molecule?
SQL: SELECT T1.atom_id, COUNT(DISTINCT T2.bond_type),T1.molecule_id FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id = 'TR000' GROUP BY T1.atom_id, T2.bond_type

Database: student_club
Question: What is the major of Garrett Gerke and which department does it belong to?
Evidence: major refers to major name;
SQL: SELECT T2.major_name, T2.department FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T1.first_name = 'Garrett' AND T1.last_name = 'Gerke'

Database: student_club
Question: What city and state did the President of the Student_Club grow up?
Evidence: 'President' is a position of Student Club;
SQL: SELECT T2.city, T2.state FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.position = 'President'

Database: codebase_community
Question: Who has the highest reputation? Please give the display name.
Evidence: the highest reputation refers to MAX(Reputation);
SQL: SELECT DisplayName FROM users WHERE Reputation = ( SELECT MAX(Reputation) FROM users )

Database: thrombosis_prediction
Question: For the patients with a normal range of creatinine phosphokinase, how many of them have a positive measure of degree of coagulation?
Evidence: normal range of creatinine phosphokinase refers to CPK < 250; positive measure of degree of coagulation refers to KCT = '+' or RVVT = '+' or LAC = '+' ;
SQL: SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.CPK < 250 AND (T3.KCT = '+' OR T3.RVVT = '+' OR T3.LAC = '+')

Database: codebase_community
Question: What is the owner's display name of the most popular post?
Evidence: Higher view count means the post has higher popularity; the most popular post refers to MAX(ViewCount);
SQL: SELECT DisplayName FROM users WHERE Id = ( SELECT OwnerUserId FROM posts ORDER BY ViewCount DESC LIMIT 1 )

Database: codebase_community
Question: What is the score and the link type ID for post ID 395?
SQL: SELECT T1.Score, T2.LinkTypeId FROM posts AS T1 INNER JOIN postLinks AS T2 ON T1.Id = T2.PostId WHERE T2.PostId = 395

Database: thrombosis_prediction
Question: Among the patients with a normal blood glucose, how many of them don't have thrombosis?
Evidence: normal blood glucose refers to GLU < 180; don't have thrombosis refers to Thrombosis = 0;
SQL: SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.GLU < 180 AND T3.Thrombosis = 0

Database: thrombosis_prediction
Question: What is the disease name of the patient who has the highest level of triglyceride within the normal range?
Evidence: disease name referse to Diagnosis; highest level of triglyceride within the normal range refers to MAX(TG < 200);
SQL: SELECT T1.Diagnosis FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG < 200 ORDER BY T2.TG DESC LIMIT 1

Database: student_club
Question: List the last name of the members of the club that attended the women's soccer event.
Evidence: members of the club refers to position = 'Member'; 'Women's Soccer' is event name;
SQL: SELECT T3.last_name FROM attendance AS T1 INNER JOIN event AS T2 ON T2.event_id = T1.link_to_event INNER JOIN member AS T3 ON T1.link_to_member = T3.member_id WHERE T2.event_name = 'Women''s Soccer' AND T3.position = 'Member'

Database: student_club
Question: Write the full name of the member who spent money for water, veggie tray and supplies and include the cost of it.
Evidence: full name refers to first_name, last name; spent money for refers expense description; expense_description = 'Water, Veggie tray, supplies'
SQL: SELECT T2.first_name, T2.last_name, T1.cost FROM expense AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id WHERE T1.expense_description = 'Water, Veggie tray, supplies'

Database: thrombosis_prediction
Question: How many patients hadn't undergone a medical examination until at least a year following their initial hospital visit?
Evidence: hadn't undergone a medical examination until at least a year refers to SUBTRACT(year(`Examination Date`), year(`First Date`)) > = 1
SQL: SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '+' AND STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.`First Date`) >= 1

Database: european_football_2
Question: Which top 4 leagues had the most games in the 2015-2016 season?
Evidence: in the 2015-2016 season refers to season = '2015/2016'; league with most games refers to League.name where MAX(COUNT(id))
SQL: SELECT t1.name FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t2.season = '2015/2016' GROUP BY t1.name ORDER BY COUNT(t2.id) DESC LIMIT 4

Database: superhero
Question: Among the bad superheroes, what is the percentage of female superheroes?
Evidence: bad superheroes refers to alignment.id = 2; percentage = MULTIPLY(DIVIDE(SUM(gender.id = 2 WHERE alignment.id = 2), COUNT(alignment.id = 2)), 100.0); female refers to gender.id = 2;
SQL: SELECT CAST(COUNT(CASE WHEN T3.gender = 'Female' THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.alignment = 'Bad'

Database: codebase_community
Question: Write the contents of comments with a score of 17.
Evidence: score of 17 refers to Score = 17; contents of comments refers to Text
SQL: SELECT Text FROM comments WHERE Score = 17

Database: formula_1
Question: List out top 3 German drivers who were born from 1980-1990 and have the earliest lap time.
Evidence: born from 1980-1990 refers to year(dob) between 1980 and 1990; earliest lap time refers to Min(time);
SQL: SELECT T2.driverId FROM pitStops AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.nationality = 'German' AND STRFTIME('%Y', T2.dob) BETWEEN '1980' AND '1990' ORDER BY T1.time LIMIT 3

Database: thrombosis_prediction
Question: Provide the ID, sex, birthday of all patients diagnosed with 'RA' that are within the UN normal index.
Evidence: within the UN normal index refers to UN < 30; Diagnosis = 'RA'
SQL: SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UN < 30 AND T1.Diagnosis = 'RA'