Database: superhero
Question: Find the average weight of the heroes who are aliens.
Evidence: average = AVG(weight_kg); aliens refers to race = 'Alien';
SQL: SELECT CAST(SUM(T1.weight_kg) AS REAL) / COUNT(T1.id) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Alien'

Database: thrombosis_prediction
Question: For the patient with the highest lactate dehydrogenase in the normal range, when was his or her data first recorded?
Evidence: highest lactate dehydrogenase in the normal range refers to MAX(LDH < 500); when the data first recorded refers to MIN(First Date);
SQL: SELECT T1.`First Date` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH < 500 ORDER BY T2.LDH ASC LIMIT 1

Database: student_club
Question: What is the name of the social event that was attended by the vice president of the Student_Club located at 900 E. Washington St.?
Evidence: name of social event refers to event_name where type = 'Social'; 'Vice President' is position; located at refers to location
SQL: SELECT T2.event_name FROM attendance AS T1 INNER JOIN event AS T2 ON T2.event_id = T1.link_to_event INNER JOIN member AS T3 ON T1.link_to_member = T3.member_id WHERE T3.position = 'Vice President' AND T2.location = '900 E. Washington St.' AND T2.type = 'Social'

Database: student_club
Question: Which student was able to generate income more than $40?
Evidence: name of students means the full name; full name refers to first_name, last_name; generate income more than $50 refers to income.amount > 40
SQL: SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T2.amount > 40

Database: european_football_2
Question: Calculate the average overall rating of Pietro Marino.
Evidence: Pietro Marino refers to player_name = 'Pietro Marino'; average overall rating AVG(T1.overall_rating)
SQL: SELECT CAST(SUM(t2.overall_rating) AS REAL) / COUNT(t2.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Pietro Marino'

Database: codebase_community
Question: How much is the total bounty amount of the post titled about 'data'
Evidence: About data means the title contains 'data'; total bounty Amount refers to Sum(BountyAmount)
SQL: SELECT SUM(T2.BountyAmount) FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId WHERE T1.Title LIKE '%data%'

Database: thrombosis_prediction
Question: How many patients with a normal level of complement 3 have a P pattern observed in the sheet of ANA examination?
Evidence: normal level of complement 3 refers to C3 > 35; have a P pattern observed in the sheet of ANA examination refers to ANA Pattern = 'P'; Should compute the number of distinct ones
SQL: SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.C3 > 35 AND T1.`ANA Pattern` = 'P'

Database: card_games
Question: Please list top two sets of cards with their IDs that have Italian-language cards and are located in the Shadowmoor block in alphabetical order.
SQL: SELECT T1.name, T1.id FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.block = 'Shadowmoor' AND T2.language = 'Italian' ORDER BY T1.id LIMIT 2

Database: thrombosis_prediction
Question: How many patients with a normal RF don't have thrombosis?
Evidence: normal RF refers to RF < 20; don't have thrombosis refers to Thrombosis = '0';
SQL: SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RF < 20 AND T1.Thrombosis = 0

Database: thrombosis_prediction
Question: Sort in descending order all patients by birthday for male patient with albumin not within range.
Evidence: male = SEX = 'M'; albumin not within range refers to ALB < = 3.5 or ALB > = 5.5
SQL: SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND (T2.ALB <= 3.5 OR T2.ALB >= 5.5) ORDER BY T1.Birthday DESC

Database: thrombosis_prediction
Question: For the patients who are diagnosed with SJS, how many of them have a normal level of total protein?
Evidence: diagnosed with SJS refers to Diagnosis = 'SJS'; normal level of total protein refers to TP > 6.0 and TP < 8.5;
SQL: SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SJS' AND T2.TP > 6.0 AND T2.TP < 8.5

Database: european_football_2
Question: Which teams have build up play passing more than 70? Please list their short names.
Evidence: build up play passing refers to buildUpPlayPassing; buildUpPlayPassing > 70; short names refers to team_short_name;
SQL: SELECT DISTINCT t1.team_short_name FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.buildUpPlayPassing > 70

Database: formula_1
Question: On what year did the youngest driver had his first qualifying race? Also state the name, date and time of the race.
Evidence: date of birth refers to drivers.dob; The larger the birthday value, the younger the person is, and vice versa; first qualifying race refers to MIN(races.date);
SQL: SELECT T3.year, T3.name, T3.date, T3.time FROM qualifying AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId INNER JOIN races AS T3 on T1.raceId = T3.raceId WHERE T1.driverId = ( SELECT driverId FROM drivers ORDER BY dob DESC LIMIT 1 ) ORDER BY T3.date ASC LIMIT 1

Database: california_schools
Question: Rank schools by their average score in Writing where the score is greater than 499, showing their charter numbers.
Evidence: Valid charter number means the number is not null
SQL: SELECT CharterNum, AvgScrWrite, RANK() OVER (ORDER BY AvgScrWrite DESC) AS WritingScoreRank FROM schools AS T1  INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T2.AvgScrWrite > 499 AND CharterNum is not null

Database: formula_1
Question: For the driver who had the Q2 time as 0:01:15 in race No. 347, where is he from?
Evidence: race number refers to raceId;
SQL: SELECT DISTINCT T2.nationality FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 347 AND T1.q2 LIKE '1:15%'

Database: formula_1
Question: What is the lap record set by Lewis Hamilton in a Formula_1 race?
Evidence: lap recod means the fastest time recorded which refers to time
SQL: SELECT T1.time FROM lapTimes AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.forename = 'Lewis' AND T2.surname = 'Hamilton'

Database: european_football_2
Question: Please list the leagues from Germany.
Evidence: Germany refers to Country.name = 'Germany';
SQL: SELECT t2.name FROM Country AS t1 INNER JOIN League AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Germany'

Database: european_football_2
Question: State the name of the most strongest player.
Evidence: strongest players refers to player has 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: formula_1
Question: Please list the exact dates on which a Formula_1 race took place on the Barcelona-Catalunya circuit.
SQL: SELECT T2.date FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Circuit de Barcelona-Catalunya'

Database: formula_1
Question: Which race was Alex Yoong in when he was in track number less than 20?
Evidence: Alex Yoong refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname;track number less than 10 refers to position < 20
SQL: SELECT T1.name FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Alex' AND T3.surname = 'Yoong' AND T2.position < 20