Database: toxicology
Question: Which molecule consisted of Sulphur atom with double bond?
Evidence: sulphur refers to element - 's'; double bond refers to bond_type = ' = ';
SQL: SELECT DISTINCT T1.molecule_id FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 's' AND T2.bond_type = '='

Database: formula_1
Question: Which of the Italian constructor got the highest point to date? Give its introduction website?
Evidence: introduction website refers to url; Italian is a nationality
SQL: SELECT T1.url FROM constructors AS T1 INNER JOIN constructorStandings AS T2 on T1.constructorId = T2.constructorId WHERE T1.nationality = 'Italian' ORDER BY T2.points DESC LIMIT 1

Database: thrombosis_prediction
Question: What proportion of patients who had signs of thrombocytopenia had SLE diagnosed?
Evidence: thrombocytopenia' refers to symptoms; 'SLE' refers to diagnosis; calculation =  DIVIDE(SUM(DIAGNOSIS LIKE '%ITP%'), SUM(DIAGNOSIS LIKE '%SLE%')) MULTIPLY 100
SQL: SELECT CAST(SUM(CASE WHEN Diagnosis = 'SLE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Examination WHERE Symptoms = 'thrombocytopenia'

Database: formula_1
Question: Among the drivers that finished the race in the 2008 Chinese Grand Prix, how many of them have participated in Formula_1 races?
Evidence: COUNT(raceID) > 0 reveals that this driver participated in races; drivers who finished the race refers to time has value.
SQL: SELECT COUNT(*) FROM ( SELECT T1.driverId FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.name = 'Chinese Grand Prix' AND T2.year = 2008 AND T1.time IS NOT NULL GROUP BY T1.driverId HAVING COUNT(T2.raceId) > 0 )

Database: card_games
Question: How many black border cards are only available on mtgo?
Evidence: black border card refers to borderColor = black; available on mtgo refers to availability = mtgo;

add quotes for string = 'black' and = 'mtgo'
SQL: SELECT COUNT(id) FROM cards WHERE availability = 'mtgo' AND borderColor = 'black'

Database: student_club
Question: Which event has the lowest cost?
Evidence: event refers to event_name; lowest cost means MIN(cost)
SQL: SELECT T1.event_name 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 ORDER BY T3.cost LIMIT 1

Database: superhero
Question: In superheroes with weight less than 100, list the full name of the superheroes with brown eyes.
Evidence: weight less than 100 refers to weight_kg < 100
SQL: SELECT T1.full_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.weight_kg < 100 AND T2.colour = 'Brown'

Database: card_games
Question: Give the code of sets have expansion commander type?
Evidence: code of sets refers to setCode
SQL: SELECT T2.setCode FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.type = 'commander'

Database: financial
Question: List out the accounts who have the earliest trading date in 1995 ?
SQL: SELECT account_id FROM trans WHERE STRFTIME('%Y', date) = '1995' ORDER BY date ASC LIMIT 1

Database: thrombosis_prediction
Question: For the patient who was diagnosed SLE on 1997/1/27, what was his/her original diagnose when he/she came to the hospital for the first time?
Evidence: 'SLE' AND original diagnose refers to diagnosis; 1997/1/27 refer to `Examination Date` = '1997-01-27'; first came to the hospital refers to patient.`First Date`
SQL: SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = ( SELECT ID FROM Examination WHERE `Examination Date` = '1997-01-27' AND Diagnosis = 'SLE' ) AND T2.`Examination Date` = T1.`First Date`

Database: debit_card_specializing
Question: Please list the countries of the gas stations with transactions taken place in June, 2013.
Evidence: June 2013 refers to '201306'; 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 DISTINCT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN yearmonth AS T3 ON T1.CustomerID = T3.CustomerID WHERE T3.Date = '201306'

Database: toxicology
Question: Among the molecules between TR004 to TR010, how many of them has single bonds?
Evidence: single bond refers to bond_type = '-'; molecules between TR004 to TR010 refers molecule_id BETWEEN 'TR004' and 'TR010';
SQL: SELECT COUNT(DISTINCT T.molecule_id) FROM bond AS T WHERE T.molecule_id BETWEEN 'TR004' AND 'TR010' AND T.bond_type = '-'

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

Database: debit_card_specializing
Question: Is it true that more SMEs pay in Czech koruna than in euros? If so, how many more?
Evidence: Amount of more SMEs = Total of SMEs pay using Currency CZK - Total of SMEs pay using Currency EUR
SQL: SELECT SUM(Currency = 'CZK') - SUM(Currency = 'EUR') FROM customers WHERE Segment = 'SME'

Database: card_games
Question: What is the Italian flavor text of the card "Ancestor's Chosen"?
Evidence: Italian refers to language = 'Italian'; flavor text refers to flavorText; "Ancestor''s Chosen" refers to name = 'Ancestor''s Chosen'
SQL: SELECT T2.flavorText FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.language = 'Italian'

Database: european_football_2
Question: In the 2015–2016 season, how many games were played in the Italian Serie A league?
Evidence: In the 2015–2016 season refers to season = '2015/2016'
SQL: SELECT COUNT(t2.id) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Italy Serie A' AND t2.season = '2015/2016'

Database: european_football_2
Question: Which of these players performs the best in crossing actions, Alexis, Ariel Borysiuk or Arouna Kone?
Evidence: player who perform best in crossing actions refers to MAX(crossing);
SQL: SELECT t1.player_name, t2.crossing FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name IN ('Alexis', 'Ariel Borysiuk', 'Arouna Kone') ORDER BY t2.crossing DESC LIMIT 1

Database: codebase_community
Question: How many positive comments are there on the list?
Evidence: Positive comment refers to score > 60
SQL: SELECT COUNT(id) FROM comments WHERE score > 60

Database: codebase_community
Question: Among the users who obtained the "Teacher" badge, calculate their percentage of users
Evidence: "Teacher" is the Name of badge;  percentage = Divide (Count(UserId where it's "Teacher"), Count(UserId)) * 100
SQL: SELECT CAST(COUNT(T1.Id) AS REAL) * 100 / (SELECT COUNT(Id) FROM users) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'Teacher'

Database: codebase_community
Question: In comments with score between 1 to 5, list down the display names of the users with 0 down votes.
Evidence: DownVotes = 0; Score BETWEEN 1 and 5
SQL: SELECT T2.DisplayName FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Score BETWEEN 1 AND 5 AND T2.DownVotes = 0