Database: formula_1
Question: Please calculate the race completion percentage of Japanese drivers from 2007 to 2009.
Evidence: from 2007 to 2009 refers to year between 2007 and 2009; race completion refers to time is not null; percentage = Divide(COUNT(DriverID where time is not null and year between 2007 and 2009),Count (DriverID where year between 2007 and 2009))*100; 
SQL: SELECT CAST(SUM(IIF(T1.time IS NOT NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.raceId) FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN drivers AS T3 on T1.driverId = T3.driverId WHERE T3.nationality = 'Japanese' AND T2.year BETWEEN 2007 AND 2009

Database: financial
Question: Which accounts placed orders for household payment in Pisek?
Evidence: k_symbol = 'SIPO' refers to household payment
SQL: SELECT DISTINCT T2.account_id FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.k_symbol = 'SIPO' AND T3.A2 = 'Pisek'

Database: card_games
Question: How many types of cards does the artist Aaron Boyd illustrated about card art?
Evidence: Aaron Boyd' is artist;
SQL: SELECT COUNT(type) FROM cards WHERE artist = 'Aaron Boyd'

Database: thrombosis_prediction
Question: Please list the patient's ID whose creatinine level is normal and whose anti Cardiolipin antibody concentration level is the highest.
Evidence: creatinine level is normal refers to CRE < 1.5; anti Cardiolipin antibody concentration level is the highest refers to MAX(aCL IgA);
SQL: SELECT T2.ID FROM Laboratory AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.CRE < 1.5 ORDER BY T2.`aCL IgA` DESC LIMIT 1

Database: debit_card_specializing
Question: What is the percentage of "premium" against the overall segment in Country = "SVK"?
SQL: SELECT CAST(SUM(IIF(Country = 'SVK' AND Segment = 'Premium', 1, 0)) AS FLOAT) * 100 / SUM(IIF(Country = 'SVK', 1, 0)) FROM gasstations

Database: financial
Question: The average unemployment ratio of 1995 and 1996, which one has higher percentage?
Evidence: A12 refers to unemploymant rate 1995; A13 refers to unemploymant rate 1996
SQL: SELECT DISTINCT IIF(AVG(A13) > AVG(A12), '1996', '1995') FROM district

Database: codebase_community
Question: List out all post ID with score more than 60 and list out all the user ID that created these post.
Evidence: score more than 60 refers to Score > 60
SQL: SELECT PostId, UserId FROM postHistory WHERE PostId IN ( SELECT Id FROM posts WHERE Score > 60 )

Database: financial
Question: What percentage of male clients request for weekly statements to be issued?
Evidence: Percentage of male clients = [count(male clients who requested weekly statements / count(clients who requested weekly statements)] * 100%; Male means gender = 'M'; 'POPLATEK TYDNE' stands for weekly issuance
SQL: SELECT CAST(SUM(T1.gender = 'M') AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T3 ON T1.district_id = T3.district_id INNER JOIN account AS T2 ON T2.district_id = T3.district_id INNER JOIN disp as T4 on T1.client_id = T4.client_id AND T2.account_id = T4.account_id WHERE T2.frequency = 'POPLATEK TYDNE'

Database: debit_card_specializing
Question: How many transactions were paid in CZK in the morning of 2012/8/26?
Evidence: '2012/8/26' can be represented by '2012-08-26'; The morning refers to the time before '13:00:00'
SQL: SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '2012-08-26' AND T1.Time < '13:00:00' AND T2.Currency = 'CZK'

Database: toxicology
Question: What are the atoms that can bond with the atom that has the element lead?
Evidence: atom that has the element lead refers to atom_id where element = 'pb'
SQL: SELECT T2.atom_id, T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 'pb'

Database: thrombosis_prediction
Question: What percentage of male patients who first presented to the hospital in 1981 were diagnosed with BEHCET?
Evidence: male refers to SEX = 'M'; first presented to the hospital in 1981 refers to YEAR(`FIRST DATE`) = '1981'; BEHCET refers to diagnosis; calculation = DIVIDE(SUM(DIAGNOSIS = 'BEHCET') where YEAR(`FIRST DATE`) = '1981', MULTIPLY(COUNT(YEAR(`FIRST DATE`) = '1981')), 100)
SQL: SELECT CAST(SUM(CASE WHEN Diagnosis = 'BEHCET' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Patient WHERE STRFTIME('%Y', `First Date`) = '1981' AND SEX = 'M'

Database: formula_1
Question: State the driver with the most points scored. Find his full name with that points.
Evidence: the most points scored refers to max(points); Full name of the driver refers to drivers.forename and drivers.surname;
SQL: SELECT T3.forename, T3.surname, T2.points FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId ORDER BY T2.points DESC LIMIT 1

Database: thrombosis_prediction
Question: Please list the diseases of the patients born after 1985-1-1 and have a normal Rhuematoid Factor.
Evidence: diseases refers to Diagnosis; born after 1985/1/1 refers to YEAR(Birthday) > = 1985; normal Rhuematoid Factor refers to RA IN('-', '+-');
SQL: SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.RA = '-' OR T2.RA = '+-') AND T1.Birthday > '1985-01-01'

Database: codebase_community
Question: Which is the most valuable post in 2010? Please give its id and the owner's display name.
Evidence: the most valuable post in 2015 refers to MAX(FavoriteCount) where year(CreationDate) = 2010;
SQL: SELECT T2.OwnerUserId, T1.DisplayName FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE STRFTIME('%Y', T1.CreationDate) = '2010' ORDER BY T2.FavoriteCount DESC LIMIT 1

Database: formula_1
Question: How many wins was achieved by the oldest racer? Indicate his/her full name.
Evidence: oldest racer refers to MIN(dob); full name refers to forename, surname.
SQL: SELECT SUM(T1.wins),T2.forename, T2.surname FROM driverStandings AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId ORDER BY T2.dob ASC LIMIT 1

Database: california_schools
Question: How many test takers are there at the school/s whose mailing city address is in Fresno?
SQL: SELECT T1.NumTstTakr FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.MailCity = 'Fresno'

Database: european_football_2
Question: Please list the names of the players whose volley score and dribbling score are over 70.
Evidence: volley score are over 70 refers to volleys > 70; dribbling score refers to dribbling are over 70 refers to dribbling > 70;
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.volleys > 70 AND t2.dribbling > 70

Database: card_games
Question: Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition.
Evidence: play format refers to format; banned status refers to status = 'Banned'; the highest number of banned status refers to MAX(COUNT(status = 'Banned'))
SQL: WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status = 'Banned'