Database: thrombosis_prediction
Question: Among the patients who have a normal platelet level, how many of them have other symptoms observed?
Evidence: normal platelet level refers to PLT > 100 and PLT < 400; have other symptoms refers to Diagnosis is not null;
SQL: SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT > 100 AND T2.PLT < 400 AND T1.Diagnosis IS NOT NULL

Database: toxicology
Question: Which type of label is the most numerous in atoms with hydrogen?
Evidence: with hydrogen refers to element = 'h'; label most numerous in atoms refers to MAX(COUNT(label)); 
SQL: SELECT T.label FROM ( SELECT T2.label, COUNT(T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'h' GROUP BY T2.label ORDER BY COUNT(T2.molecule_id) DESC LIMIT 1 ) t

Database: card_games
Question: How many cards with unknown power that can't be found in foil is in duel deck A?
Evidence: unknown power refers to power IS NULL or power = '*'; can't be found in foil refers to hasFoil = 0; duel deck A refers to duelDeck = 'a'
SQL: SELECT SUM(CASE WHEN power = '*' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE hasFoil = 0 AND duelDeck = 'a'

Database: superhero
Question: What is the eye clolour of the heaviest superhero?
Evidence: the heaviest superhero refers to MAX(weight_kg); eye colour refers to colour where eye_colour_id = colour.id;
SQL: SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id ORDER BY T1.weight_kg DESC LIMIT 1

Database: codebase_community
Question: What is the display name of the user who acquired the highest amount of badges?
Evidence: highest amount of badges refers to MAX(COUNT(Name));
SQL: SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId GROUP BY T1.DisplayName ORDER BY COUNT(T1.Id) DESC LIMIT 1

Database: codebase_community
Question: What is the title of the post that is owned by csgillespie and has the highest popularity?
Evidence: "csgillespie" is the DisplayName of user; highest popularity refers to Max(ViewCount)
SQL: SELECT T1.Title FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie' ORDER BY T1.ViewCount DESC LIMIT 1

Database: student_club
Question: Calculate the percentage of zip codes that are PO boxes.
Evidence: DIVIDE(SUM(type = 'PO Box'), COUNT(zip_code)) * 100
SQL: SELECT CAST(SUM(CASE WHEN type = 'PO Box' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(zip_code) FROM zip_code

Database: debit_card_specializing
Question: Which customers, paying in CZK, consumed the most gas in 2011?
Evidence: Year 2011 can be presented as Between 201101 And 201112, which means between January and December in 2011
SQL: SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Currency = 'CZK' AND T2.Date BETWEEN 201101 AND 201112 GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1

Database: toxicology
Question: List all the elements of the toxicology of the molecule "TR004".
Evidence: TR004 is the molecule id;
SQL: SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR004'

Database: financial
Question: List account ID and account opening date for accounts from 'Prachatice'.
Evidence: A2 refers to the names of districts.
SQL: SELECT T1.account_id, T1.date FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A2 = 'Prachatice'

Database: superhero
Question: Give the hero ID of superhero with the lowest attribute value.
Evidence: lowest attribute value refers to MIN(attribute_value);
SQL: SELECT hero_id FROM hero_attribute WHERE attribute_value = ( SELECT MIN(attribute_value) FROM hero_attribute )

Database: formula_1
Question: How many British drivers were born after 1980?
Evidence: born after 1980 refers to year (dob) >1980;
SQL: SELECT COUNT(driverId) FROM drivers WHERE nationality = 'British' AND STRFTIME('%Y', dob) > '1980'

Database: california_schools
Question: What is the lowest grade for the District Special Education Consortia School with National Center for Educational Statistics school district identification number of 0613360?
Evidence: District Special Education Consortia School refers to EdOpsCode = 'SPECON'.
SQL: SELECT MIN(T1.`Low Grade`) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.NCESDist = '0613360' AND T2.EdOpsCode = 'SPECON'

Database: codebase_community
Question: How many users are awarded with more than 5 badges?
Evidence: more than 5 badges refers to Count (Name) > 5; user refers to UserId
SQL: SELECT COUNT(UserId) FROM ( SELECT UserId, COUNT(Name) AS num FROM badges GROUP BY UserId ) T WHERE T.num > 5

Database: debit_card_specializing
Question: Which country's gas station had the first paid cusomer in 2012/8/25?
Evidence: '2012/8/25' can be represented by '2012-08-25'
SQL: SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-25' ORDER BY T1.Time DESC LIMIT 1

Database: european_football_2
Question: Indicate the full names of the top 10 players with the highest number of penalties.
Evidence: full name refers to player_name; players with highest number of penalties refers to MAX(penalties);
SQL: SELECT t2.player_name FROM Player_Attributes AS t1 INNER JOIN Player AS t2 ON t1.id = t2.id ORDER BY t1.penalties DESC LIMIT 10

Database: codebase_community
Question: Give the number of votes for the post about data visualization.
Evidence: About data visualization is the Title that contains 'data visualization';
SQL: SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId WHERE T1.Title LIKE '%data visualization%'

Database: toxicology
Question: List the toxicology elements associated with molecule TR001.
Evidence: TR001 is the molecule id
SQL: SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR001'

Database: card_games
Question: List all the sets available in Italian translation. State the total number of cards per set.
Evidence: Italian translation refers to language = 'Italian'; total number of card per set refers to totalSetSize;
SQL: SELECT T1.name, T1.totalSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Italian'

Database: california_schools
Question: How many schools in Fresno (directly funded) have number of test takers not more than 250?
SQL: SELECT COUNT(T1.CDSCode) FROM frpm AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.`Charter Funding Type` = 'Directly funded' AND T1.`County Name` = 'Fresno' AND T2.NumTstTakr <= 250

Database: codebase_community
Question: List out the dates that users who are located in Rochester, NY obtained their badges?
Evidence: "Rochester, NY" is the Location of user; user refers to UserId
SQL: SELECT T2.Date FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Location = 'Rochester, NY'

Database: card_games
Question: What is the percentage of Story Spotlight cards that do not have a text box? List them by their ID.
Evidence: Story Spotlight cards that do not have a text box refers to isStorylight = 1 and isTextless = 0; Percentage = DIVIDE(SUM(count(id) where isStorylight = 1 AND isTextless = 0 ), SUM(count(id))) * 100
SQL: SELECT CAST(SUM(CASE WHEN isTextless = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM cards WHERE isStorySpotlight = 1

Database: california_schools
Question: What is the district code for the School that does not offer a magnet program in the city of Fresno?
Evidence: When magent is equal to 0 in the database, it means ths school doesn't offer a magnet program.
SQL: SELECT T1.`District Code` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.City = 'Fresno' AND T2.Magnet = 0