Database: student_club
Question: What is the average attendance of meetings in 2020?
Evidence: meetings in 2020 refers to type = 'Meeting' where YEAR(event_date) = 2020; average = DIVIDE(COUNT(event_id), COUNT(DISTINCT event_name))
SQL: SELECT CAST(COUNT(T2.link_to_event) AS REAL) / COUNT(DISTINCT T2.link_to_event) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE SUBSTR(T1.event_date, 1, 4) = '2020' AND T1.type = 'Meeting'

Database: student_club
Question: Did Maya Mclean attend the 'Women's Soccer' event?
Evidence: Maya Mclean is the full name; full name refers to first_name, last_name; 'Women's Soccer' is an event_name
SQL: SELECT CASE WHEN T3.event_name = 'Women''s Soccer' THEN 'YES' END AS result FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member INNER JOIN event AS T3 ON T2.link_to_event = T3.event_id WHERE T1.first_name = 'Maya' AND T1.last_name = 'Mclean'

Database: formula_1
Question: Who was the driver that got the best lap time in the race No. 348? Give his full name.
Evidence: race number refers to raceId; the best lap time refers to MIN(time)
SQL: SELECT T2.forename, T2.surname FROM lapTimes AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 348 ORDER BY T1.time ASC LIMIT 1

Database: european_football_2
Question: In what country did the Poland Ekstraklasa take place?
SQL: SELECT name FROM Country WHERE id IN ( SELECT country_id FROM League WHERE name = 'Poland Ekstraklasa' )

Database: thrombosis_prediction
Question: What sex is the patient who in a medical examination was diagnosed with PSS and in a laboratory examination had a blood level of C-reactive protein de 2+, createnine 1 and LDH 123?
Evidence: PSS' refers to diagnosis; blood level of C-reactive protein de 2+refers to CRP > 2; createnine 1 refers to CRE = 1; LDH 123 refers to LDH = 123
SQL: SELECT T1.SEX FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID INNER JOIN Laboratory AS T3 ON T3.ID = T2.ID WHERE T2.Diagnosis = 'PSS' AND T3.CRP = '2+' AND T3.CRE = 1.0 AND T3.LDH = 123

Database: formula_1
Question: Please list the positions of the circuits built by the constructor Renault.
Evidence: Renault is a name of constructor;
SQL: SELECT DISTINCT T1.position FROM constructorStandings AS T1 INNER JOIN constructors AS T2 ON T2.constructorId = T1.constructorId WHERE T2.name = 'Renault'

Database: european_football_2
Question: Please name one player whose overall strength is the greatest.
Evidence: overall strength is the greatest refers to MAX(overall_rating)
SQL: SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.overall_rating = ( SELECT MAX(overall_rating) FROM Player_Attributes)

Database: toxicology
Question: What is the bond type of TR007_4_19?
Evidence: double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';
SQL: SELECT T.bond_type FROM bond AS T WHERE T.bond_id = 'TR007_4_19'

Database: debit_card_specializing
Question: In 2012, who had the least consumption in LAM?
Evidence: Year 2012 can be presented as Between 201201 And 201212; The first 4 strings of the Date values in the yearmonth table can represent year.
SQL: SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'LAM' AND SUBSTR(T2.Date, 1, 4) = '2012' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) ASC LIMIT 1

Database: superhero
Question: How many superheroes have the super power of "Super Strength"?
Evidence: super power of "Super Strength" refers to power_name = 'Super Strength'
SQL: SELECT COUNT(T1.hero_id) FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T2.power_name = 'Super Strength'

Database: thrombosis_prediction
Question: For the examinations done after 1997/1/1, how many of them have the result of an inactivated partial prothrom bin time?
Evidence: examinations done after 1997/1/1 refers to `Examination Date` > '1997-01-01'; normal activated partial prothrom bin time refesr to APTT < 45;
SQL: SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.Date > '1997-01-01' AND T2.APTT >= 45

Database: formula_1
Question: In terms of number of points acquired, how many victories did the driver who ranked 91st acquired?
Evidence: victories refer to wins; 91st refers to points


SQL: SELECT SUM(CASE WHEN points = 91 THEN wins ELSE 0 END) FROM driverStandings

Database: codebase_community
Question: Mention the display name and location of the user who owned the excerpt post with hypothesis-testing tag.
Evidence: user who owned the excerpt post with hypothesis-testing tag refers to OwnerUserId WHERE TagName = 'hypothesis-testing';
SQL: SELECT T3.DisplayName, T3.Location FROM tags AS T1 INNER JOIN posts AS T2 ON T1.ExcerptPostId = T2.Id INNER JOIN users AS T3 ON T3.Id = T2.OwnerUserId WHERE T1.TagName = 'hypothesis-testing'

Database: european_football_2
Question: Please provide top five football players' IDs who are among the lowest potential players and prefer to use the right foot when attacking.
Evidence: lowest potential players refers to MIN(potential); prefer to use the right foot when attacking refers to preferred_foot = 'right'
SQL: SELECT id FROM Player_Attributes WHERE preferred_foot = 'right' ORDER BY potential DESC LIMIT 5

Database: toxicology
Question: Which carcinogenic molecule have the highest number of atoms consisted in it?
Evidence: label = '+' mean molecules are carcinogenic; molecule that have the highest number of atoms consisted in in refers to MAX(COUNT(atom.molecule_id))
SQL: SELECT T.molecule_id FROM ( SELECT T2.molecule_id, COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' GROUP BY T2.molecule_id ORDER BY COUNT(T1.atom_id) DESC LIMIT 1 ) t

Database: toxicology
Question: What is the label for bond ID TR001_10_11?
Evidence: label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
SQL: SELECT T2.label FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_id = 'TR001_10_11'

Database: toxicology
Question: What are the toxicology elements associated with bond ID TR000_1_2?
Evidence: TR000_1_2 is the bond id;
SQL: SELECT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id = 'TR000_1_2'

Database: formula_1
Question: Which circuit did the 2009 Spanish Grand Prix use?
SQL: SELECT T1.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2009 AND T2.name = 'Spanish Grand Prix'

Database: card_games
Question: Name the card and artist with the most ruling information. Also state if the card is a promotional printing.
Evidence: with the most ruling information refers to Max(count(rulings.uuid)); the card is the promotional printing refers to isPromo = 1;
SQL: SELECT T1.name, T1.artist, T1.isPromo FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.isPromo = 1 AND T1.artist = (SELECT artist FROM cards WHERE isPromo = 1 GROUP BY artist HAVING COUNT(DISTINCT uuid) = (SELECT MAX(count_uuid) FROM ( SELECT COUNT(DISTINCT uuid) AS count_uuid FROM cards WHERE isPromo = 1 GROUP BY artist ))) LIMIT 1

Database: debit_card_specializing
Question: Please list the chains of the gas stations with transactions in euro.
SQL: SELECT DISTINCT T3.ChainID FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN gasstations AS T3 ON T1.GasStationID = T3.GasStationID WHERE T2.Currency = 'EUR'