Database: thrombosis_prediction
Question: Provide the ID and age of patient with lactate dehydrogenase (LDH) between 100-300 index above the normal range.
Evidence: age refers to SUBTRACT(year(current_timestamp), year(Birthday)); lactate dehydrogenase (LDH) between 100-300 index above the normal range refers to LDH between 600 and 800;
SQL: SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH > 600 AND T2.LDH < 800

Database: california_schools
Question: What is the ratio in percentage of Santa Clara County schools that are locally funded compared to all other types of charter school funding?
Evidence: Ratio in percentage = (count(locally funded schools in Santa Clara) / count(all funding type schools in Santa Clara) * 100%
SQL: SELECT CAST(SUM(CASE WHEN FundingType = 'Locally funded' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN FundingType != 'Locally funded' THEN 1 ELSE 0 END) FROM schools WHERE County = 'Santa Clara' AND Charter = 1

Database: debit_card_specializing
Question: For the deal happened at 2012/8/24 12:42:00, which country was it?
Evidence: '2012/8/24 12:42:00' can refer to date = '2012-08-24' AND T1.time = '12:42:00' in the database
SQL: SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-24' AND T1.Time = '12:42:00'

Database: european_football_2
Question: What is the average overall rating of the players born before the year 1986?
Evidence: average overall rating = DIVIDE(SUM(overall_rating), COUNT(id)); born before the year 1986 refers to strftime('%Y', birthday) < '1986';
SQL: SELECT SUM(t2.overall_rating) / COUNT(t1.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t1.birthday, 1, 4) < '1986'

Database: card_games
Question: Is there any card from Erica Yang artist in pauper format and available in paper? If so, indicate its ID.
Evidence: available in paper refers to availability = 'paper'
SQL: SELECT T1.id FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Erica Yang' AND T2.format = 'pauper' AND T1.availability = 'paper'

Database: codebase_community
Question: Identify the display name and location of the user, who was the last to edit the post with ID 183.
Evidence: last to edit refers to MAX(LastEditDate);
SQL: SELECT T2.DisplayName, T2.Location FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Id = 183 ORDER BY T1.LastEditDate DESC LIMIT 1

Database: financial
Question: What is the sum that client number 4's account has following transaction 851? Who owns this account, a man or a woman?
SQL: SELECT T4.balance, T1.gender FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 ON T2.account_id =T3.account_id INNER JOIN trans AS T4 ON T3.account_id = T4.account_id WHERE T1.client_id = 4 AND T4.trans_id = 851

Database: codebase_community
Question: What is the display name of the user who has the most number of views?
Evidence: user who has the most number of view refers to Max(Views)
SQL: SELECT DisplayName FROM users WHERE Views = ( SELECT MAX(Views) FROM users )

Database: financial
Question: What is the percentage of loan amount that has been fully paid with no issue.
Evidence: Loan paid with no issue means contract finished, no problems; status = 'A' means contract finished, no problems; Percentage of accounts by condition = [(total(amount) & condition) / (total amount)] * 100%
SQL: SELECT (CAST(SUM(CASE WHEN status = 'A' THEN amount ELSE 0 END) AS REAL) * 100) / SUM(amount) FROM loan

Database: card_games
Question: How many cards are there with toughness of 99?
SQL: SELECT COUNT(id) FROM cards WHERE toughness = 99

Database: european_football_2
Question: List the players' api id who had the highest above average overall ratings in 2010.
Evidence: highest above average overall ratings refers to MAX(overall_rating); in 2010 refers to substr(date,1,4) = '2010';
SQL: SELECT player_api_id FROM Player_Attributes WHERE SUBSTR(`date`, 1, 4) = '2010' ORDER BY overall_rating DESC LIMIT 1

Database: codebase_community
Question: Which users have the highest number of views?
Evidence: users have the highest number of views refer to DisplayName where MAX(Views);
SQL: SELECT Id, DisplayName FROM users WHERE Views = ( SELECT MAX(Views) FROM users )

Database: superhero
Question: List down Ajax's superpowers.
Evidence: Ajax refers to superhero_name = 'Ajax'; superpowers refers to power_name;
SQL: SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.superhero_name = 'Ajax'

Database: codebase_community
Question: When did 'chl' cast its first vote in a post?
Evidence: DisplayName = 'chl'; cast its first vote refers to MIN(CreationDate);
SQL: SELECT T2.CreationDate FROM users AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'chl' ORDER BY T2.CreationDate LIMIT 1

Database: california_schools
Question: In chartered schools with charter number 00D2, what are the names of all the administrators? Include the name of the school and the city to which it belongs
Evidence: Chartered schools refer to Charter = 1 in the table schools; Full name refers to first name, last name
SQL: SELECT AdmFName1, AdmLName1, School, City FROM schools WHERE Charter = 1 AND CharterNum = '00D2'

Database: superhero
Question: How many superheroes with blonde hair are there?
Evidence: superheroes with blonde hair refers to colour = 'Blond' where hair_colour_id = colour.id
SQL: SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.hair_colour_id = T2.id WHERE T2.colour = 'Blond'

Database: formula_1
Question: How many Japanese constructors have 0 points in 2 races?
Evidence: 2 races refers to COUNT(raceID) = 2; Japanese refers to constructors.nationality = 'Japanese';
SQL: SELECT COUNT(T1.raceId) FROM constructorStandings AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T1.points = 0 AND T2.nationality = 'Japanese' GROUP BY T1.constructorId HAVING COUNT(raceId) = 2

Database: european_football_2
Question: Give the name of the league had the most goals in the 2016 season?
Evidence: league that had the most goals refers to MAX(SUM(home_team_goal, away_team_goal)); 2016 season refers to season = '2015/2016';
SQL: SELECT t2.name FROM Match AS t1 INNER JOIN League AS t2 ON t1.league_id = t2.id WHERE t1.season = '2015/2016' GROUP BY t2.name ORDER BY SUM(t1.home_team_goal + t1.away_team_goal) DESC LIMIT 1

Database: california_schools
Question: What is the type of education offered in the school who scored the highest average in Math?
SQL: SELECT T2.EdOpsName FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrMath DESC LIMIT 1

Database: financial
Question: List all the clients' IDs whose junior credit cards were issued after 1996.
Evidence: After 1996 means date > = '1997-01-01
SQL: SELECT T2.client_id FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type = 'junior' AND T1.issued >= '1997-01-01'

Database: superhero
Question: What is the publisher name of the superhero ID 38?
Evidence: superhero ID 38 refers to superhero.id = 38;
SQL: SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.id = 38

Database: european_football_2
Question: What is the highest overall rating received by Dorlan Pabon?
Evidence: Dorlan Pabon refers to T2.player_name = 'Dorlan Pabon'; highest overall rating refers to MAX(overall_rating)
SQL: SELECT MAX(t2.overall_rating) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Dorlan Pabon'