Database: formula_1
Question: How many French drivers who obtain the laptime less than 02:00.00?
Evidence: lap time less than 02:00.00 refers to seconds < 120;
SQL: SELECT COUNT(T1.driverId) FROM drivers AS T1 INNER JOIN lapTimes AS T2 on T1.driverId = T2.driverId WHERE T1.nationality = 'French' AND (CAST(SUBSTR(T2.time, 1, 2) AS INTEGER) * 60 + CAST(SUBSTR(T2.time, 4, 2) AS INTEGER) + CAST(SUBSTR(T2.time, 7, 2) AS REAL) / 1000) < 120

Database: superhero
Question: Name the tallest superhero.
Evidence: tallest superhero refers to MAX(height_cm);
SQL: SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1

Database: superhero
Question: Provide the hair colour of the human superhero who is 185 cm tall.
Evidence: 185 cm tall refers to height_cm = 185; human superhero refers to race = 'human'; hair colour refers to colour where hair_colour_id = colour.id;
SQL: SELECT DISTINCT T3.colour FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id INNER JOIN colour AS T3 ON T1.hair_colour_id = T3.id WHERE T1.height_cm = 185 AND T2.race = 'Human'

Database: thrombosis_prediction
Question: What is the percentage of the female patient whose uric acid (UA) beyond the normal range?
Evidence: uric acid (UA) beyond the normal range refers to UA > 8.0 and SEX = 'M' or UA > 6.5 and SEX = 'F'; female refers to Sex = 'F'
SQL: SELECT CAST(SUM(CASE WHEN T2.UA > 6.5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F'

Database: codebase_community
Question: Provide the last edit date and last edit user ID for the post "Detecting a given face in a database of facial images".
Evidence: Title = 'Detecting a given face in a database of facial images';
SQL: SELECT LastEditDate, LastEditorUserId FROM posts WHERE Title = 'Detecting a given face in a database of facial images'

Database: european_football_2
Question: What was the build up play speed class for "Willem II" on 2011/2/22?
Evidence: "Willem II" refers to team_long_name = 'Willem II'; on 2011/2/22 refers to date = '2012-02-22'
SQL: SELECT t2.buildUpPlaySpeedClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Willem II' AND SUBSTR(t2.`date`, 1, 10) = '2011-02-22'

Database: codebase_community
Question: Describe the last accessed date and location of the users who received the outliers badge.
Evidence: Outliers is the name of the badge;
SQL: SELECT T1.LastAccessDate, T1.Location FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'outliers'

Database: student_club
Question: Indicate the top source of funds received in September 2019 based on their amount.
Evidence: top source funds refers to MAX(source); September 2019 means date_received BETWEEN '2019-09-01' and '2019-09-30'
SQL: SELECT source FROM income WHERE date_received BETWEEN '2019-09-01' and '2019-09-30' ORDER BY source DESC LIMIT 1

Database: california_schools
Question: Which state special schools have the highest number of enrollees from grades 1 through 12?
Evidence: State Special Schools refers to DOC = 31; Grades 1 through 12 means K-12
SQL: SELECT T2.School FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.DOC = 31 ORDER BY T1.`Enrollment (K-12)` DESC LIMIT 1

Database: codebase_community
Question: User No.23853 gave a comment to a post at 9:08:18 on 2013/7/12, was that post well-finished?
Evidence: user no. 23853 refers to UserId = '23853'; at 9:08:18 on 2013/7/12 refers to CreationDate = '2013-07-12 09:08:18.0'; not well-finished refers to ClosedDate IS NULL and vice versa
SQL: SELECT IIF(T2.ClosedDate IS NULL, 'NOT well-finished', 'well-finished') AS resylt FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.UserId = 23853 AND T1.CreationDate = '2013-07-12 09:08:18.0'

Database: european_football_2
Question: What is the preferred foot when attacking of the youngest football player?
Evidence: preferred foot when attacking refers to preferred_foot; youngest football player refers to latest birthday;
SQL: SELECT t2.preferred_foot FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t1.birthday DESC LIMIT 1

Database: student_club
Question: State the major name for the Vice President of the club.
Evidence: 'Vice President' is a position of Student Club
SQL: SELECT T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position = 'Vice President'

Database: formula_1
Question: What is the rate of drivers completing all the laps in the 2008 Australian Grand Prix?
Evidence: completing all the laps refers to time is not null; rate = divide(COUNT(raceID where time is not null), COUNT(raceID))
SQL: SELECT CAST(SUM(IIF(T1.time IS NOT NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.resultId) FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId WHERE T2.name = 'Australian Grand Prix' AND T2.year = 2008

Database: codebase_community
Question: What is the date when the youngest user made his or her first post?
Evidence: the youngest user refers to MIN(Age); first post refers to MIN(CreaionDate);
SQL: SELECT T2.CreaionDate FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.Age IS NOT NULL ORDER BY T1.Age, T2.CreaionDate LIMIT 1

Database: card_games
Question: Lists all types of cards available in arena.
Evidence: all types refer to subtypes and supertypes

availble in arena refers to availability = 'arena'
SQL: SELECT DISTINCT subtypes, supertypes FROM cards WHERE availability = 'arena' AND subtypes IS NOT NULL AND supertypes IS NOT NULL

Database: codebase_community
Question: What is the post ID and the comments commented in the post titled by "Group differences on a five point Likert item"?
Evidence: Title = 'Group differences on a five point Likert item';
SQL: SELECT T2.Id, T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.Title = 'Group differences on a five point Likert item'

Database: thrombosis_prediction
Question: For the patient who was born on 1959/2/18, what is the decrease rate for his/her total cholesterol from November to December in 1981?
Evidence: born on 1959/2/18 refers to Birthday = '1959-02-18'; calculation = SUBTRACT(SUM(Birthday = '1959-02-18' and Date like '1981-11-%' THEN `T-CHO`), SUM(Birthday = '1959-02-18' and Date like '1981-12-%' THEN `T-CHO`))
SQL: SELECT CAST((SUM(CASE WHEN T2.Date LIKE '1981-11-%' THEN T2.`T-CHO` ELSE 0 END) - SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END)) AS REAL) / SUM(CASE WHEN T2.Date LIKE '1981-12-%' THEN T2.`T-CHO` ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Birthday = '1959-02-18'

Database: formula_1
Question: Name the races in year 2017 that are not hosted in year 2000.
Evidence: not hosted means not in;
SQL: SELECT name FROM races WHERE year = 2017 AND name NOT IN ( SELECT name FROM races WHERE year = 2000 )

Database: student_club
Question: How many students of the Student_Club have attended the event "Women's Soccer"?
Evidence: Women's Soccer is an event name
SQL: SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'Women''s Soccer'

Database: superhero
Question: Calculate the average attribute value of all neutral superheroes.
Evidence: average = AVG(attribute_value); neutral superheroes refers to alignment_id = 3;
SQL: SELECT AVG(T1.attribute_value) FROM hero_attribute AS T1 INNER JOIN superhero AS T2 ON T1.hero_id = T2.id INNER JOIN alignment AS T3 ON T2.alignment_id = T3.id WHERE T3.alignment = 'Neutral'