question_id
int64
0
1.53k
db_id
stringclasses
11 values
question
stringlengths
23
286
gold_sql
stringlengths
29
1.45k
gold_columns
stringlengths
11
227
n_gold_columns
int64
1
11
n_schema_columns
int64
11
199
label_source
stringclasses
7 values
800
superhero
Calculate the percentage of superheroes with blue eyes.
SELECT CAST(COUNT(CASE WHEN T2.colour = 'Blue' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id
colour.colour; colour.id; superhero.eye_colour_id; superhero.id
4
31
unchanged
801
superhero
Find the ratio between male superheroes and female superheroes.
SELECT CAST(COUNT(CASE WHEN T2.gender = 'Male' THEN T1.id ELSE NULL END) AS REAL) / COUNT(CASE WHEN T2.gender = 'Female' THEN T1.id ELSE NULL END) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id
gender.gender; gender.id; superhero.gender_id; superhero.id
4
31
unchanged
802
superhero
Who is the tallest superhero?
SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1
superhero.height_cm; superhero.superhero_name
2
31
unchanged
803
superhero
What is the power ID of cryokinesis?
SELECT id FROM superpower WHERE power_name = 'Cryokinesis'
superpower.id; superpower.power_name
2
31
unchanged
804
superhero
Provide the name of superhero with superhero ID 294.
SELECT superhero_name FROM superhero WHERE id = 294
superhero.id; superhero.superhero_name
2
31
unchanged
805
superhero
List the full names of superheroes with missing weight.
SELECT DISTINCT full_name FROM superhero WHERE full_name IS NOT NULL AND (weight_kg IS NULL OR weight_kg = 0)
superhero.full_name; superhero.weight_kg
2
31
unchanged
806
superhero
Provide the eye colour of the superhero who has Karen Beecher-Duncan as their full name.
SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.full_name = 'Karen Beecher-Duncan'
colour.colour; colour.id; superhero.eye_colour_id; superhero.full_name
4
31
unchanged
807
superhero
What is the superpowers of the superhero has Helen Parr as their full name?
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.full_name = 'Helen Parr'
hero_power.hero_id; hero_power.power_id; superhero.full_name; superhero.id; superpower.id; superpower.power_name
6
31
unchanged
808
superhero
Find the race of the superhero who weighs 108kg and is 188cm tall.
SELECT DISTINCT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.weight_kg = 108 AND T1.height_cm = 188
race.id; race.race; superhero.height_cm; superhero.race_id; superhero.weight_kg
5
31
unchanged
809
superhero
What is the publisher name of the superhero ID 38?
SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.id = 38
publisher.id; publisher.publisher_name; superhero.id; superhero.publisher_id
4
31
unchanged
810
superhero
What is the race of the superhero with maximum attribute value?
SELECT T3.race FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN race AS T3 ON T1.race_id = T3.id ORDER BY T2.attribute_value DESC LIMIT 1
hero_attribute.attribute_value; hero_attribute.hero_id; race.id; race.race; superhero.id; superhero.race_id
6
31
joinkey_added
811
superhero
Give the alignment and superpowers of the superhero named Atom IV.
SELECT T4.alignment, 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 T3.id = T2.power_id INNER JOIN alignment AS T4 ON T1.alignment_id = T4.id WHERE T1.superhero_name = 'Atom IV'
alignment.alignment; alignment.id; hero_power.hero_id; hero_power.power_id; superhero.alignment_id; superhero.id; superhero.superhero_name; superpower.id; superpower.power_name
9
31
joinkey_added
812
superhero
List down at least five full names of superheroes with blue eyes.
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T2.colour = 'Blue' LIMIT 5
colour.colour; colour.id; superhero.eye_colour_id; superhero.superhero_name
4
31
unchanged
813
superhero
Calculate the average attribute value of all neutral superheroes.
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'
alignment.alignment; alignment.id; hero_attribute.attribute_value; hero_attribute.hero_id; superhero.alignment_id; superhero.id
6
31
unchanged
814
superhero
List the skin colour of the superheroes with 100 attribute value.
SELECT DISTINCT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.skin_colour_id = T2.id INNER JOIN hero_attribute AS T3 ON T1.id = T3.hero_id WHERE T3.attribute_value = 100
colour.colour; colour.id; hero_attribute.attribute_value; hero_attribute.hero_id; superhero.id; superhero.skin_colour_id
6
31
unchanged
815
superhero
Count the good female superheroes.
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.alignment = 'Good' AND T3.gender = 'Female'
alignment.alignment; alignment.id; gender.gender; gender.id; superhero.alignment_id; superhero.gender_id; superhero.id
7
31
unchanged
816
superhero
Provide the names of superheroes with attribute value between 75 to 80.
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id WHERE T2.attribute_value BETWEEN 75 AND 80
hero_attribute.attribute_value; hero_attribute.hero_id; superhero.id; superhero.superhero_name
4
31
unchanged
817
superhero
Give the race of the blue-haired male superhero.
SELECT T3.race FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.hair_colour_id = T2.id INNER JOIN race AS T3 ON T1.race_id = T3.id INNER JOIN gender AS T4 ON T1.gender_id = T4.id WHERE T2.colour = 'Blue' AND T4.gender = 'Male'
colour.colour; colour.id; gender.gender; gender.id; race.id; race.race; superhero.gender_id; superhero.hair_colour_id; superhero.race_id
9
31
unchanged
818
superhero
Among the bad superheroes, what is the percentage of female superheroes?
SELECT CAST(COUNT(CASE WHEN T3.gender = 'Female' THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.alignment = 'Bad'
alignment.alignment; alignment.id; gender.gender; gender.id; superhero.alignment_id; superhero.gender_id; superhero.id
7
31
unchanged
819
superhero
In superheroes with missing weight data, calculate the difference between the number of superheroes with blue eyes and no eye color.
SELECT SUM(CASE WHEN T2.id = 7 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.id = 1 THEN 1 ELSE 0 END) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.weight_kg = 0 OR T1.weight_kg is NULL
colour.id; superhero.eye_colour_id; superhero.weight_kg
3
31
empty_fixed,joinkey_added
820
superhero
How strong is the Hulk?
SELECT T2.attribute_value FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T1.superhero_name = 'Hulk' AND T3.attribute_name = 'Strength'
attribute.attribute_name; attribute.id; hero_attribute.attribute_id; hero_attribute.attribute_value; hero_attribute.hero_id; superhero.id; superhero.superhero_name
7
31
unchanged
821
superhero
List down Ajax's superpowers.
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 = 'Ajax'
hero_power.hero_id; hero_power.power_id; superhero.id; superhero.superhero_name; superpower.id; superpower.power_name
6
31
unchanged
822
superhero
How many green-skinned villains are there in the superhero universe?
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id INNER JOIN colour AS T3 ON T1.skin_colour_id = T3.id WHERE T2.alignment = 'Bad' AND T3.colour = 'Green'
alignment.alignment; alignment.id; colour.colour; colour.id; superhero.alignment_id; superhero.id; superhero.skin_colour_id
7
31
unchanged
823
superhero
How many female superheroes are in Marvel Comics?
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.publisher_name = 'Marvel Comics' AND T3.gender = 'Female'
gender.gender; gender.id; publisher.id; publisher.publisher_name; superhero.gender_id; superhero.id; superhero.publisher_id
7
31
unchanged
824
superhero
Identify superheroes who can control wind and list their names in alphabetical order.
SELECT T1.superhero_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 T3.power_name = 'Wind Control' ORDER BY T1.superhero_name
hero_power.hero_id; hero_power.power_id; superhero.id; superhero.superhero_name; superpower.id; superpower.power_name
6
31
unchanged
825
superhero
Identify the gender of the superhero who has the ability of Phoenix Force.
SELECT T4.gender 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 INNER JOIN gender AS T4 ON T1.gender_id = T4.id WHERE T3.power_name = 'Phoenix Force'
gender.gender; gender.id; hero_power.hero_id; hero_power.power_id; superhero.gender_id; superhero.id; superpower.id; superpower.power_name
8
31
joinkey_added
826
superhero
Identify the heaviest superhero in DC Comics.
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'DC Comics' ORDER BY T1.weight_kg DESC LIMIT 1
publisher.id; publisher.publisher_name; superhero.publisher_id; superhero.superhero_name; superhero.weight_kg
5
31
unchanged
827
superhero
What is the average height of a non-human superhero in Dark Horse Comics?
SELECT AVG(T1.height_cm) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN race AS T3 ON T1.race_id = T3.id WHERE T2.publisher_name = 'Dark Horse Comics' AND T3.race != 'Human'
publisher.id; publisher.publisher_name; race.id; race.race; superhero.height_cm; superhero.publisher_id; superhero.race_id
7
31
unchanged
828
superhero
Count the fastest superheroes.
SELECT COUNT(T3.superhero_name) FROM hero_attribute AS T1 INNER JOIN attribute AS T2 ON T1.attribute_id = T2.id INNER JOIN superhero AS T3 ON T1.hero_id = T3.id WHERE T2.attribute_name = 'Speed' AND T1.attribute_value = 100
attribute.attribute_name; attribute.id; hero_attribute.attribute_id; hero_attribute.attribute_value; hero_attribute.hero_id; superhero.id; superhero.superhero_name
7
31
joinkey_added
829
superhero
Which publisher created more superheroes: DC or Marvel Comics? Find the difference in the number of superheroes.
SELECT SUM(CASE WHEN T2.publisher_name = 'DC Comics' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id
publisher.id; publisher.publisher_name; superhero.publisher_id
3
31
unchanged
830
superhero
Identify the weakest attribute of the Black Panther.
SELECT T3.attribute_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T1.superhero_name = 'Black Panther' ORDER BY T2.attribute_value ASC LIMIT 1
attribute.attribute_name; attribute.id; hero_attribute.attribute_id; hero_attribute.attribute_value; hero_attribute.hero_id; superhero.id; superhero.superhero_name
7
31
unchanged
831
superhero
What is Abomination's eye colour?
SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.superhero_name = 'Abomination'
colour.colour; colour.id; superhero.eye_colour_id; superhero.superhero_name
4
31
unchanged
832
superhero
Name the tallest superhero.
SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1
superhero.height_cm; superhero.superhero_name
2
31
unchanged
833
superhero
Name the superhero, otherwise known as Charles Chandler.
SELECT superhero_name FROM superhero WHERE full_name = 'Charles Chandler'
superhero.full_name; superhero.superhero_name
2
31
unchanged
834
superhero
Among all superheroes created by George Lucas, identify the percentage of female superheroes.
SELECT CAST(COUNT(CASE WHEN T3.gender = 'Female' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.publisher_name = 'George Lucas'
gender.gender; gender.id; publisher.id; publisher.publisher_name; superhero.gender_id; superhero.id; superhero.publisher_id
7
31
joinkey_added
835
superhero
Among all superheroes in Marvel Comics, identify the percentage of 'good' superheroes.
SELECT CAST(COUNT(CASE WHEN T3.alignment = 'Good' THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN alignment AS T3 ON T1.alignment_id = T3.id WHERE T2.publisher_name = 'Marvel Comics'
alignment.alignment; alignment.id; publisher.id; publisher.publisher_name; superhero.alignment_id; superhero.id; superhero.publisher_id
7
31
empty_fixed,joinkey_added
836
superhero
What is the total number of superheroes that have John as their first name?
SELECT COUNT(id) FROM superhero WHERE full_name LIKE 'John%'
superhero.full_name; superhero.id
2
31
unchanged
837
superhero
Give the hero ID of superhero with the lowest attribute value.
SELECT hero_id FROM hero_attribute WHERE attribute_value = ( SELECT MIN(attribute_value) FROM hero_attribute )
hero_attribute.attribute_value; hero_attribute.hero_id
2
31
unchanged
838
superhero
Provide the full name of the superhero named Alien.
SELECT full_name FROM superhero WHERE superhero_name = 'Alien'
superhero.full_name; superhero.superhero_name
2
31
unchanged
839
superhero
In superheroes with weight less than 100, list the full name of the superheroes with brown eyes.
SELECT T1.full_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.weight_kg < 100 AND T2.colour = 'Brown'
colour.colour; colour.id; superhero.eye_colour_id; superhero.full_name; superhero.weight_kg
5
31
unchanged
840
superhero
List the attribute value of the superhero named Aquababy.
SELECT T2.attribute_value FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id WHERE T1.superhero_name = 'Aquababy'
hero_attribute.attribute_value; hero_attribute.hero_id; superhero.id; superhero.superhero_name
4
31
unchanged
841
superhero
Provide the weight and race of the superhero with superhero ID 40.
SELECT T1.weight_kg, T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.id = 40
race.id; race.race; superhero.id; superhero.race_id; superhero.weight_kg
5
31
joinkey_added
842
superhero
Calculate the average height of all neutral superheroes.
SELECT AVG(T1.height_cm) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'
alignment.alignment; alignment.id; superhero.alignment_id; superhero.height_cm
4
31
joinkey_added
843
superhero
List the hero ID of superheroes have intellegence as their power.
SELECT T1.hero_id FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T2.power_name = 'Intelligence'
hero_power.hero_id; hero_power.power_id; superpower.id; superpower.power_name
4
31
unchanged
844
superhero
Give the eye colour of Blackwulf.
SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.superhero_name = 'Blackwulf'
colour.colour; colour.id; superhero.eye_colour_id; superhero.superhero_name
4
31
unchanged
845
superhero
List the power of superheroes with height greater than 80% of the average height of all superheroes.
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.height_cm * 100 > ( SELECT AVG(height_cm) FROM superhero ) * 80
hero_power.hero_id; hero_power.power_id; superhero.height_cm; superhero.id; superpower.id; superpower.power_name
6
31
unchanged
846
formula_1
Please list the reference names of the drivers who are eliminated in the first period in race number 20.
SELECT T2.driverRef FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 20 ORDER BY T1.q1 DESC LIMIT 5
drivers.driverId; drivers.driverRef; qualifying.driverId; qualifying.q1; qualifying.raceId
5
94
unchanged
847
formula_1
What is the surname of the driver with the best lap time in race number 19 in the second qualifying period?
SELECT T2.surname FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 19 ORDER BY T1.q2 ASC LIMIT 1
drivers.driverId; drivers.surname; qualifying.driverId; qualifying.q2; qualifying.raceId
5
94
unchanged
848
formula_1
Please list the year during which the race is held on circuits in Shanghai.
SELECT T2.year FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.location = 'Shanghai'
circuits.circuitId; circuits.location; races.circuitId; races.year
4
94
joinkey_added
849
formula_1
Where can the introduction of the races held on Circuit de Barcelona-Catalunya be found?
SELECT DISTINCT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Circuit de Barcelona-Catalunya'
circuits.circuitId; circuits.name; circuits.url; races.circuitId
4
94
joinkey_added
850
formula_1
Please give the name of the race held on the circuits in Germany.
SELECT DISTINCT T2.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'Germany'
circuits.circuitId; circuits.country; races.circuitId; races.name
4
94
joinkey_added
851
formula_1
Please list the positions of the circuits built by the constructor Renault.
SELECT DISTINCT T1.position FROM constructorStandings AS T1 INNER JOIN constructors AS T2 ON T2.constructorId = T1.constructorId WHERE T2.name = 'Renault'
constructorStandings.constructorId; constructorStandings.position; constructors.constructorId; constructors.name
4
94
unchanged
852
formula_1
How many races in the year 2010 are held on grand prixs outside Asia and Europe?
SELECT COUNT(T3.raceId) FROM circuits AS T1 INNER JOIN races AS T3 ON T3.circuitID = T1.circuitId WHERE T1.country NOT IN ( 'Bahrain', 'China', 'Singapore', 'Japan', 'Korea', 'Turkey', 'UAE', 'Malaysia', 'Spain', 'Monaco', 'Azerbaijan', 'Austria', 'Belgium', 'France', 'Germany', 'Hungary', 'Italy', 'UK' ) AND T3.year =...
circuits.circuitId; circuits.country; races.circuitId; races.raceId; races.year
5
94
joinkey_added
853
formula_1
Please give the names of the races held on the circuits in Spain.
SELECT DISTINCT T2.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'Spain'
circuits.circuitId; circuits.country; races.circuitId; races.name
4
94
joinkey_added
854
formula_1
What is the coordinates location of the circuits for Australian grand prix?
SELECT DISTINCT T1.lat, T1.lng FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Australian Grand Prix'
circuits.circuitId; circuits.lat; circuits.lng; races.circuitId; races.name
5
94
joinkey_added
855
formula_1
Where can I find the information about the races held on Sepang International Circuit?
SELECT DISTINCT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Sepang International Circuit'
circuits.circuitId; circuits.name; circuits.url; races.circuitId
4
94
joinkey_added
856
formula_1
Please list the time of the races held on Sepang International Circuit.
SELECT DISTINCT T2.time FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Sepang International Circuit'
circuits.circuitId; circuits.name; races.circuitId; races.time
4
94
joinkey_added
857
formula_1
Give the coordinate position for Abu Dhabi Grand Prix.
SELECT DISTINCT T1.lat, T1.lng FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Abu Dhabi Grand Prix'
circuits.circuitId; circuits.lat; circuits.lng; races.circuitId; races.name
5
94
joinkey_added
858
formula_1
Which country is the constructor which got 1 point in the race No. 24 from?
SELECT T2.nationality FROM constructorResults AS T1 INNER JOIN constructors AS T2 ON T2.constructorId = T1.constructorId WHERE T1.raceId = 24 AND T1.points = 1
constructorResults.constructorId; constructorResults.points; constructorResults.raceId; constructors.constructorId; constructors.nationality
5
94
unchanged
859
formula_1
What's Bruno Senna's Q1 result in the qualifying race No. 354?
SELECT T1.q1 FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 354 AND T2.forename = 'Bruno' AND T2.surname = 'Senna'
drivers.driverId; drivers.forename; drivers.surname; qualifying.driverId; qualifying.q1; qualifying.raceId
6
94
unchanged
860
formula_1
For the driver who had the Q2 time as 0:01:40 in the qualifying race No. 355, what is his nationality?
SELECT DISTINCT T2.nationality FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 355 AND T1.q2 LIKE '1:40%'
drivers.driverId; drivers.nationality; qualifying.driverId; qualifying.q2; qualifying.raceId
5
94
unchanged
861
formula_1
What is his number of the driver who finished 0:01:54 in the Q3 of qualifying race No.903?
SELECT T2.number FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 903 AND T1.q3 LIKE '1:54%'
drivers.driverId; drivers.number; qualifying.driverId; qualifying.q3; qualifying.raceId
5
94
unchanged
862
formula_1
For the Bahrain Grand Prix in 2007, how many drivers not finished the game?
SELECT COUNT(T3.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T1.year = 2007 AND T1.name = 'Bahrain Grand Prix' AND T2.time IS NULL
drivers.driverId; races.name; races.raceId; races.year; results.driverId; results.raceId; results.time
7
94
joinkey_added
863
formula_1
Show me the season page of year when the race No. 901 took place.
SELECT T2.url FROM races AS T1 INNER JOIN seasons AS T2 ON T2.year = T1.year WHERE T1.raceId = 901
races.raceId; races.year; seasons.url; seasons.year
4
94
unchanged
864
formula_1
For the race happened on 2015/11/29, how many drivers finished the game?
SELECT COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.date = '2015-11-29' AND T2.time IS NOT NULL
races.date; races.raceId; results.driverId; results.raceId; results.time
5
94
unchanged
865
formula_1
For all the drivers who finished the game in race No. 592, who is the oldest?
SELECT T1.forename, T1.surname FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 592 AND T2.time IS NOT NULL AND T1.dob IS NOT NULL ORDER BY T1.dob ASC LIMIT 1
drivers.dob; drivers.driverId; drivers.forename; drivers.surname; results.driverId; results.raceId; results.time
7
94
unchanged
866
formula_1
Who was the player that got the lap time of 0:01:27 in the race No. 161? Show his introduction website.
SELECT DISTINCT T2.forename, T2.surname, T2.url FROM lapTimes AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 161 AND T1.time LIKE '1:27%'
drivers.driverId; drivers.forename; drivers.surname; drivers.url; lapTimes.driverId; lapTimes.raceId; lapTimes.time
7
94
unchanged
867
formula_1
For the driver who set the fastest lap speed in race No.933, where does he come from?
SELECT T1.nationality FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 933 AND T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapSpeed DESC LIMIT 1
drivers.driverId; drivers.nationality; results.driverId; results.fastestLapSpeed; results.fastestLapTime; results.raceId
6
94
unchanged
868
formula_1
Where is Malaysian Grand Prix held? Give the location coordinates.
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'
circuits.circuitId; circuits.lat; circuits.lng; races.circuitId; races.name
5
94
joinkey_added
869
formula_1
For the constructor which got the highest point in the race No. 9 , what is its introduction website?
SELECT T2.url FROM constructorResults AS T1 INNER JOIN constructors AS T2 ON T2.constructorId = T1.constructorId WHERE T1.raceId = 9 ORDER BY T1.points DESC LIMIT 1
constructorResults.constructorId; constructorResults.points; constructorResults.raceId; constructors.constructorId; constructors.url
5
94
unchanged
870
formula_1
What's Lucas di Grassi's Q1 result in the race No. 345?
SELECT T1.q1 FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 345 AND T2.forename = 'Lucas' AND T2.surname = 'di Grassi'
drivers.driverId; drivers.forename; drivers.surname; qualifying.driverId; qualifying.q1; qualifying.raceId
6
94
unchanged
871
formula_1
For the driver who had the Q2 time as 0:01:15 in race No. 347, where is he from?
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%'
drivers.driverId; drivers.nationality; qualifying.driverId; qualifying.q2; qualifying.raceId
5
94
joinkey_added
872
formula_1
In the race No. 45, for the driver who had the Q3 time as 0:01:33, what is his abbreviated code?
SELECT T2.code FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 45 AND T1.q3 LIKE '1:33%'
drivers.code; drivers.driverId; qualifying.driverId; qualifying.q3; qualifying.raceId
5
94
unchanged
873
formula_1
What is the actual finish time for Bruce McLaren in the race No.743?
SELECT T2.time FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 743 AND T1.forename = 'Bruce' AND T1.surname = 'McLaren'
drivers.driverId; drivers.forename; drivers.surname; results.driverId; results.raceId; results.time
6
94
unchanged
874
formula_1
Who finished second in the San Marino Grand Prix in 2006?
SELECT T3.forename, T3.surname FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T1.year = 2006 AND T1.name = 'San Marino Grand Prix' AND T2.position = 2
drivers.driverId; drivers.forename; drivers.surname; races.name; races.raceId; races.year; results.driverId; results.position; results.raceId
9
94
joinkey_added
875
formula_1
Show me the season page of year when the race No. 901 took place.
SELECT T2.url FROM races AS T1 INNER JOIN seasons AS T2 ON T2.year = T1.year WHERE T1.raceId = 901
races.raceId; races.year; seasons.url; seasons.year
4
94
unchanged
876
formula_1
For the race happened in 2015/11/29, how many drivers did not finish the game?
SELECT COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.date = '2015-11-29' AND T2.time IS NULL
races.date; races.raceId; results.driverId; results.raceId; results.time
5
94
unchanged
877
formula_1
For all the drivers who finished the game in race No. 872, who is the youngest?
SELECT T1.forename, T1.surname FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 872 AND T2.time IS NOT NULL ORDER BY T1.dob DESC LIMIT 1
drivers.dob; drivers.driverId; drivers.forename; drivers.surname; results.driverId; results.raceId; results.time
7
94
unchanged
878
formula_1
Who was the driver that got the best lap time in the race No. 348? Give his full name.
SELECT T2.forename, T2.surname FROM lapTimes AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 348 ORDER BY T1.time ASC LIMIT 1
drivers.driverId; drivers.forename; drivers.surname; lapTimes.driverId; lapTimes.raceId; lapTimes.time
6
94
unchanged
879
formula_1
For the driver who set the fastest lap speed, what is his nationality?
SELECT T1.nationality FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId ORDER BY T2.fastestLapSpeed DESC LIMIT 1
drivers.driverId; drivers.nationality; results.driverId; results.fastestLapSpeed
4
94
unchanged
880
formula_1
Paul di Resta was in the No. 853 race, what percent faster did he finish in the 853rd race than the next race for the fastest lap speed?
SELECT (SUM(IIF(T2.raceId = 853, T2.fastestLapSpeed, 0)) - SUM(IIF(T2.raceId = 854, T2.fastestLapSpeed, 0))) * 100 / SUM(IIF(T2.raceId = 853, T2.fastestLapSpeed, 0)) FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T1.forename = 'Paul' AND T1.surname = 'di Resta'
drivers.driverId; drivers.forename; drivers.surname; results.driverId; results.fastestLapSpeed; results.raceId
6
94
unchanged
881
formula_1
For the drivers who took part in the race in 1983/7/16, what's their race completion rate?
SELECT CAST(COUNT(CASE WHEN T2.time IS NOT NULL THEN T2.driverId END) AS REAL) * 100 / COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.date = '1983-07-16'
races.date; races.raceId; results.driverId; results.raceId; results.time
5
94
unchanged
882
formula_1
Which year was the first Singapore Grand Prix?
SELECT year FROM races WHERE name = 'Singapore Grand Prix' ORDER BY year ASC LIMIT 1
races.name; races.year
2
94
ambiguity_resolved
883
formula_1
How many races were there in 2005? Name all the races in descending order.
SELECT name FROM races WHERE year = 2005 ORDER BY name DESC
races.name; races.year
2
94
ambiguity_resolved
884
formula_1
List the names of all races that occurred in the earliest recorded year and month.
SELECT name FROM races WHERE STRFTIME('%Y', date) = ( SELECT STRFTIME('%Y', date) FROM races ORDER BY date ASC LIMIT 1 ) AND STRFTIME('%m', date) = ( SELECT STRFTIME('%m', date) FROM races ORDER BY date ASC LIMIT 1 )
races.date; races.name
2
94
unchanged
885
formula_1
State the name and date of the last round of race in year 1999.
SELECT name, date FROM races WHERE year = 1999 ORDER BY round DESC LIMIT 1
races.date; races.name; races.round; races.year
4
94
unchanged
886
formula_1
Which year has the most number of races?
SELECT year FROM races GROUP BY year ORDER BY COUNT(round) DESC LIMIT 1
races.round; races.year
2
94
unchanged
887
formula_1
Name the races in year 2017 that are not hosted in year 2000.
SELECT name FROM races WHERE year = 2017 AND name NOT IN ( SELECT name FROM races WHERE year = 2000 )
races.name; races.year
2
94
unchanged
888
formula_1
In which country was the first European Grand Prix hosted? Name the circuit and location.
SELECT T1.country, T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'European Grand Prix' ORDER BY T2.year ASC LIMIT 1
circuits.circuitId; circuits.country; circuits.location; races.circuitId; races.name; races.year
6
94
joinkey_added
889
formula_1
When was the last f1 season whereby Brands Hatch hosted the British Grand Prix?
SELECT T2.date FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Brands Hatch' AND T2.name = 'British Grand Prix' ORDER BY T2.year DESC LIMIT 1
circuits.circuitId; circuits.name; races.circuitId; races.date; races.name; races.year
6
94
joinkey_added
890
formula_1
How many seasons has Silverstone Circuit hosted the United Kindom grand prix?
SELECT COUNT(T2.circuitid) FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Silverstone Circuit' AND T2.name = 'British Grand Prix'
circuits.circuitId; circuits.name; races.circuitId; races.name
4
94
joinkey_added
891
formula_1
Name all drivers in the 2010 Singapore Grand Prix order by their position stands.
SELECT T3.forename, T3.surname 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 T1.name = 'Singapore Grand Prix' AND T1.year = 2010 ORDER BY T2.position ASC
driverStandings.driverId; driverStandings.position; driverStandings.raceId; drivers.driverId; drivers.forename; drivers.surname; races.name; races.raceId; races.year
9
94
unchanged
892
formula_1
State the driver with the most points scored. Find his full name with that points.
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
driverStandings.driverId; driverStandings.points; driverStandings.raceId; drivers.driverId; drivers.forename; drivers.surname; races.raceId
7
94
unchanged
893
formula_1
Name the top 3 drivers and the points they scored in the 2017 Chinese Grand Prix.
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 WHERE T1.name = 'Chinese Grand Prix' AND T1.year = 2017 ORDER BY T2.points DESC LIMIT 3
driverStandings.driverId; driverStandings.points; driverStandings.raceId; drivers.driverId; drivers.forename; drivers.surname; races.name; races.raceId; races.year
9
94
unchanged
894
formula_1
What is the best lap time recorded? List the driver and race with such recorded lap time.
SELECT T2.milliseconds, T1.forename, T1.surname, T3.name FROM drivers AS T1 INNER JOIN lapTimes AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T2.raceId = T3.raceId ORDER BY T2.milliseconds ASC LIMIT 1
drivers.driverId; drivers.forename; drivers.surname; lapTimes.driverId; lapTimes.milliseconds; lapTimes.raceId; races.name; races.raceId
8
94
joinkey_added
895
formula_1
What is the average lap time for Lewis Hamilton in the 2009 Malaysian Grand Prix?
SELECT AVG(T2.milliseconds) FROM races AS T1 INNER JOIN lapTimes AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Lewis' AND T3.surname = 'Hamilton' AND T1.year = 2009 AND T1.name = 'Malaysian Grand Prix'
drivers.driverId; drivers.forename; drivers.surname; lapTimes.driverId; lapTimes.milliseconds; lapTimes.raceId; races.name; races.raceId; races.year
9
94
unchanged
896
formula_1
Calculate the percentage whereby Hamilton was not at the 1st track of the the f1 circuit since 2010.
SELECT CAST(COUNT(CASE WHEN T2.position <> 1 THEN T2.position END) AS REAL) * 100 / COUNT(T2.driverStandingsId) 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.surname = 'Hamilton' AND T1.year >= 2010
driverStandings.driverId; driverStandings.driverStandingsId; driverStandings.position; driverStandings.raceId; drivers.driverId; drivers.surname; races.raceId; races.year
8
94
empty_fixed,joinkey_added
897
formula_1
Name the driver with the most winning. Mention his nationality and what is his maximum point scores.
SELECT T1.forename, T1.surname, T1.nationality, MAX(T2.points) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T2.driverId = T1.driverId WHERE T2.wins >= 1 GROUP BY T1.forename, T1.surname, T1.nationality ORDER BY COUNT(T2.wins) DESC LIMIT 1
driverStandings.driverId; driverStandings.points; driverStandings.wins; drivers.driverId; drivers.forename; drivers.nationality; drivers.surname
7
94
joinkey_added
898
formula_1
How old is the youngest Japanese driver? What is his name?
SELECT STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', dob), forename , surname FROM drivers WHERE nationality = 'Japanese' ORDER BY dob DESC LIMIT 1
drivers.dob; drivers.forename; drivers.nationality; drivers.surname
4
94
joinkey_added
899
formula_1
List circuits which host 4 f1 races from year 1990 to 2000.
SELECT DISTINCT T1.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE STRFTIME('%Y', T2.date) BETWEEN '1990' AND '2000' GROUP BY T1.name HAVING COUNT(T2.raceId) = 4
circuits.circuitId; circuits.name; races.circuitId; races.date; races.raceId
5
94
joinkey_added