Database: codebase_community
Question: Among products comments with 0 score, what is the total number of users ages 40 years old?
SQL: SELECT COUNT(DISTINCT T1.id) FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Score = 0 AND T2.Age = 40

Database: european_football_2
Question: List all the football player with the highest balance score and potential score of 61.
Evidence: balance score refers to balance; highest balance score refers to MAX(balance); potential score refers to potential; potential = 61;
SQL: SELECT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.potential = '61' ORDER BY t2.balance DESC LIMIT 1

Database: card_games
Question: How many translations are there for the set of cards with "Angel of Mercy" in it?
Evidence: set of cards with "Angel of Mercy" in it refers to name = 'Angel of Mercy'
SQL: SELECT COUNT(DISTINCT translation) FROM set_translations WHERE setCode IN ( SELECT setCode FROM cards WHERE name = 'Angel of Mercy' ) AND translation IS NOT NULL

Database: codebase_community
Question: How long did it take the user, known by his or her display name 'Zolomon' to get the badge? Count from the date the user's account was created.
Evidence: SUBTRACT(Date from stats_badges, CreationDate) where DisplayName = 'Zolomon';
SQL: SELECT T1.Date - T2.CreationDate FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'Zolomon'

Database: formula_1
Question: Where is Malaysian Grand Prix held? Give the location coordinates.
Evidence: location coordinates refers to (lat, lng); Malaysian Grand Prix refers to races.name = 'Malaysian Grand Prix'
SQL: SELECT DISTINCT T1.lat, T1.lng FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Malaysian Grand Prix'

Database: thrombosis_prediction
Question: What are the symptoms observed by the youngest patient to ever did a medical examination? Identify their diagnosis.
Evidence: The larger the birthday value, the younger the person is, and vice versa; symptoms observed refers to the symptoms is not NULL
SQL: SELECT T2.Symptoms, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Symptoms IS NOT NULL ORDER BY T1.Birthday DESC LIMIT 1

Database: card_games
Question: How many cards are there in the base set of "Hauptset Zehnte Edition"?
Evidence: "Hauptset Zehnte Edition" refers to translation = 'Hauptset Zehnte Edition'; number of cards refers to baseSetSize
SQL: SELECT T1.baseSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Hauptset Zehnte Edition'

Database: european_football_2
Question: Which home team had lost the fewest matches in the 2016 season?
Evidence: home team lost the matches refers to SUBTRACT(home_team_goal, away_team_goal) < 0; 2016 season refers to season = '2015/2016';
SQL: SELECT teamDetails.team_long_name FROM Match AS matchData INNER JOIN Team AS teamDetails ON matchData.home_team_api_id = teamDetails.team_api_id WHERE matchData.season = '2015/2016' AND matchData.home_team_goal - matchData.away_team_goal < 0 GROUP BY matchData.home_team_api_id ORDER BY COUNT(*) ASC LIMIT 1

Database: card_games
Question: How many cards of legalities whose status is restricted are found in a starter deck?
Evidence: restricted refers to status = 'restricted'; found in the starter deck refers to isStarter = 1;
SQL: SELECT COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Restricted' AND T1.isStarter = 1

Database: thrombosis_prediction
Question: What is the percentage of female patient were born after 1930?
Evidence: female refers to Sex = 'F'; patient who were born after 1930 refers to year(Birthday) > '1930'; calculation = DIVIDE(COUNT(ID) where year(Birthday) > '1930' and SEX = 'F'), (COUNT(ID) where SEX = 'F')
SQL: SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', Birthday) > '1930' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Patient WHERE SEX = 'F'

Database: thrombosis_prediction
Question: How many patients diagnosed with SLE have a normal white blood cell level?
Evidence: diagnosed with SLE refers to Diagnosis = 'SLE'; normal white blood cell level refers to WBC between 3.5 and 9.0;
SQL: SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SLE' AND T2.WBC BETWEEN 3.5 AND 9

Database: formula_1
Question: What's the finish time for the driver who ranked second in 2008's AustChineseralian Grand Prix?
Evidence: finish time refers to time; Chinese Grand Prix refers to races.name = 'Chinese Grand Prix';
SQL: SELECT T1.time FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T1.rank = 2 AND T2.name = 'Chinese Grand Prix' AND T2.year = 2008

Database: card_games
Question: Which set is not available outside of the United States and has foil cards with Japanese writing on them? Please include the set ID in your response.
Evidence: available outside of the United States refers to isForeignOnly = 1; has foil cards refers to isFoilOnly = 1; with Japanese writing on them refers to language = 'Japanese'
SQL: SELECT T1.name, T1.id FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Japanese' AND T1.isFoilOnly = 1 AND T1.isForeignOnly = 0

Database: thrombosis_prediction
Question: For the patient whose birthday was 1959/3/1, what symptoms did he/she have during the examination on 1993/9/27?
SQL: SELECT T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-03-01' AND T2.`Examination Date` = '1993-09-27'

Database: codebase_community
Question: How many adults who obtained the badge Supporter?
Evidence: Supporter is the Name of badge; adult refers to Age BETWEEN 19 AND 65
SQL: SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'Supporter' AND T1.Age BETWEEN 19 AND 65

Database: codebase_community
Question: What is the id of the youngest user?
Evidence: the youngest user refers to MIN(Age);
SQL: SELECT Id FROM users WHERE Age = ( SELECT MIN(Age) FROM users )

Database: codebase_community
Question: Which post by Harvey Motulsky has the most views? Please give the id and title of this post.
Evidence: DisplayName = 'Harvey Motulsky'; the most views refer to MAX(ViewCount);
SQL: SELECT T2.Id, T2.Title FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'Harvey Motulsky' ORDER BY T2.ViewCount DESC LIMIT 1

Database: superhero
Question: What is the eye colour of superhero with superhero ID 75?
Evidence: 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 WHERE T1.id = 75

Database: european_football_2
Question: Calculate the average home team goal in the 2010/2011 season in the country of Poland.
Evidence: average home team goal = AVG(home_team_goal)= SUM(home_team_goal) / COUNT(DISTINCT Match.id) WHERE name = 'Poland' and season = '2010/2011';
SQL: SELECT CAST(SUM(t2.home_team_goal) AS REAL) / COUNT(t2.id) FROM Country AS t1 INNER JOIN Match AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Poland' AND t2.season = '2010/2011'

Database: thrombosis_prediction
Question: How many patients accepted to the hospital have a normal level of white blood cells?
Evidence: accepted to the hospital refers to Admission = '+'; normal level of white blood cells refers to WBC between 3.5 and 9.0;
SQL: SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC BETWEEN 3.5 AND 9 AND T1.Admission = '+'