Database: california_schools
Question: List the names of virtual schools that are among the top 5 in their respective counties based on average reading scores.
Evidence: Exclusively virtual refers to Virtual = 'F'; respective counties means PARTITION BY County
SQL: SELECT School FROM (SELECT T2.School,T1.AvgScrRead, RANK() OVER (PARTITION BY T2.County ORDER BY T1.AvgScrRead DESC) AS rnk FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Virtual = 'F' ) ranked_schools WHERE rnk <= 5

Database: student_club
Question: Based on the total cost for all event, what is the percentage of cost for Yearly Kickoff event?
Evidence: percentage = DIVIDE(SUM(cost where event_name = 'Yearly Kickoff'), SUM(cost)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T1.event_name = 'Yearly Kickoff' THEN T3.cost ELSE 0 END) AS REAL) * 100 / SUM(T3.cost) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget

Database: toxicology
Question: Give me the molecule ID of the double bond type.
Evidence: double bond refers to bond_type = ' = ';
SQL: SELECT DISTINCT T.molecule_id FROM bond AS T WHERE T.bond_type = '='

Database: codebase_community
Question: How many users whose reputations are higher than 2000 and the number of views is higher than 1000?
Evidence: reputations are higher than 2000 refer to Reputation > 2000; number of views is higher than 1000 refers to Views > 1000;
SQL: SELECT COUNT(id) FROM users WHERE Reputation > 2000 AND Views > 1000

Database: student_club
Question: List the full name of all the members of the Student_Club who attended the "Laugh Out Loud" event.
Evidence: full name of members refers to first_name, last_name; 'Laugh Out Loud' is an event name;
SQL: SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member INNER JOIN event AS T3 ON T2.link_to_event = T3.event_id WHERE T3.event_name = 'Laugh Out Loud'

Database: european_football_2
Question: What percentage of players have a strength and stamina score of more than 80?
Evidence: strength and stamina score of more than 80 refers to stamina > 80 and strength > 80
SQL: SELECT CAST(COUNT(CASE WHEN strength > 80 AND stamina > 80 THEN id ELSE NULL END) AS REAL) * 100 / COUNT(id) FROM Player_Attributes t

Database: superhero
Question: Provide the superpowers of the superhero called Deathlok.
Evidence: superpowers refers to power_name; Deathlok refers to superhero_name = 'Deathlok'
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 = 'Deathlok'

Database: formula_1
Question: What is the most laps f1 races had? Name the race, year and circuit location where the races with most laps was hosted.
SQL: SELECT T3.lap, T2.name, T2.year, T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T1.circuitId = T2.circuitId INNER JOIN lapTimes AS T3 ON T3.raceId = T2.raceId ORDER BY T3.lap DESC LIMIT 1

Database: card_games
Question: Among black card borders, which card has full artwork?
Evidence: white card borders refers to borderColor = 'white'; has full artwork refers to isFullArt = 1
SQL: SELECT id FROM cards WHERE borderColor = 'black' AND isFullArt = 1

Database: card_games
Question: What's the magic card market name for the set which was released on 2017/6/9?
Evidence: magic card market name refers to mcmName
SQL: SELECT mcmName FROM sets WHERE releaseDate = '2017-06-09'

Database: financial
Question: Which districts have transactions greater than USS$10,000 in 1997?
SQL: SELECT T1.district_id FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T1.account_id = T3.account_id WHERE STRFTIME('%Y', T3.date) = '1997' GROUP BY T1.district_id HAVING SUM(T3.amount) > 10000

Database: codebase_community
Question: Give the texts commented on the post about linear regression.
Evidence: about linear regression refers to Title contains 'linear regression'
SQL: SELECT T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.Title LIKE '%linear regression%'

Database: formula_1
Question: List out top 10 Spanish drivers who were born before 1982 and have the latest lap time.
Evidence: born before 1982 refers to year(dob) < 1982; latest lap time refers to Max(time);
SQL: SELECT T2.driverId FROM pitStops AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.nationality = 'Spanish' AND STRFTIME('%Y', T2.dob) < '1982' ORDER BY T1.time DESC LIMIT 10