query_id
int64 0
1.53k
| database_id
stringclasses 11
values | table_id
sequencelengths 1
4
| query
stringlengths 23
286
| answer
stringlengths 29
1.45k
| difficulty
stringclasses 3
values | evidence
stringlengths 0
591
|
---|---|---|---|---|---|---|
800 | superhero | [
"superhero",
"colour"
] | 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 | moderate | percentage = MULTIPLY(DIVIDE(SUM(superhero_name WHERE eye_colour_id = 7), COUNT(superhero_name)), 100.0); blue eyes refers to eye_colour_id = 7; |
801 | superhero | [
"superhero",
"gender"
] | 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 | moderate | ratio = DIVIDE(SUM(gender_id = 1) / SUM(gender_id = 2)); male superheroes refers to gender_id = 1; female superheroes refers to gender_id = 2; |
802 | superhero | [
"superhero"
] | Who is the tallest superhero? | SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1 | simple | who refers to superhero_name; tallest superhero refers to MAX(height_cm); |
803 | superhero | [
"superpower"
] | What is the power ID of cryokinesis? | SELECT id FROM superpower WHERE power_name = 'Cryokinesis' | simple | power ID refers to superpower.id; cryokinesis refers to power_name = 'cryokinesis'; |
804 | superhero | [
"superhero"
] | Provide the name of superhero with superhero ID 294. | SELECT superhero_name FROM superhero WHERE id = 294 | simple | name of superhero refers to superhero_name; superhero ID 294 refers to superhero.id = 294; |
805 | superhero | [
"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) | simple | missing weight refers to weight_kg = 0 OR weight_kg = NULL; |
806 | superhero | [
"superhero",
"colour"
] | 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' | simple | eye colour refers to colour.colour where eye_colour_id = colour.id; Karen Beecher-Duncan is the full name of superhero; |
807 | superhero | [
"superhero",
"superpower",
"hero_power"
] | 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' | simple | superpowers refers to power_name; Helen Parr is the full name of superhero; |
808 | superhero | [
"superhero",
"race"
] | 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 | simple | weighs 108kg refers to weight_kg = 108; 188cm tall refers to height_cm = 188; |
809 | superhero | [
"publisher",
"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 | simple | superhero ID 38 refers to superhero.id = 38; |
810 | superhero | [
"superhero",
"hero_attribute",
"race"
] | 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 | simple | maximum attribute value refers to MAX(attribute_value); |
811 | superhero | [
"superhero",
"superpower",
"hero_power"
] | Give the alignment and superpowers of the superhero named Atom IV. | 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 T3.id = T2.power_id WHERE T1.superhero_name = 'Atom IV' | simple | superpowers refers to power_name; |
812 | superhero | [
"superhero",
"colour"
] | 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 | simple | blue eyes refers to colour.colour = 'Blue' WHERE eye_colour_id = colour.id; |
813 | superhero | [
"superhero",
"alignment",
"hero_attribute"
] | 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' | simple | average = AVG(attribute_value); neutral superheroes refers to alignment_id = 3; |
814 | superhero | [
"superhero",
"hero_attribute",
"colour"
] | 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 | moderate | skin colour refers to colour.colour where skin_colour_id = colour.id; 100 attribute value refers to attribute_value = 100; |
815 | superhero | [
"superhero",
"alignment",
"gender"
] | 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' | simple | good refers to alignment.id = 1; female refers to gender.id = 2; |
816 | superhero | [
"superhero",
"hero_attribute"
] | 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 | simple | names of superheroes refers to superhero_name; attribute value between 75 to 80 refers to attribute_value BETWEEN 75 AND 80; |
817 | superhero | [
"superhero",
"gender",
"race",
"colour"
] | 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' | moderate | blue-haired refers to colour.colour = 'blue' WHERE hair_colour_id = colour.id; male refers to gender = 'male'; |
818 | superhero | [
"superhero",
"alignment",
"gender"
] | 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' | challenging | bad superheroes refers to alignment.id = 2; percentage = MULTIPLY(DIVIDE(SUM(gender.id = 2 WHERE alignment.id = 2), COUNT(alignment.id = 2)), 100.0); female refers to gender.id = 2; |
819 | superhero | [
"superhero",
"colour"
] | 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 | challenging | missing weight data refers to weight_kg = 0 OR T1.weight_kg = NULL; difference = SUBTRACT(SUM(colour.id = 7), SUM(colour.id = 1)); blue eyes refers to eye_colour_id WHERE colour.id = 7; no eye color refers to eye_colour_id WHERE colour.id = 1; |
820 | superhero | [
"attribute",
"superhero",
"hero_attribute"
] | 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' | moderate | how strong refers to attribute_value WHERE attribute_name = 'Strength'; the Hulk refers to superhero_name = 'Hulk'; |
821 | superhero | [
"superhero",
"superpower",
"hero_power"
] | 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' | simple | Ajax refers to superhero_name = 'Ajax'; superpowers refers to power_name; |
822 | superhero | [
"superhero",
"alignment",
"colour"
] | 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' | moderate | green-skinned refers to colour.colour = 'Green' WHERE skin_colour_id = colour.id; villains refers to alignment = 'Bad'; |
823 | superhero | [
"publisher",
"superhero",
"gender"
] | 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' | moderate | female refers to gender = 'Female'; Marvel Comics refers to publisher_name = 'Marvel Comics'; |
824 | superhero | [
"superhero",
"superpower",
"hero_power"
] | 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 | moderate | superheroes refers to superhero_name; can control wind refers to power_name = 'Wind Control'; |
825 | superhero | [
"superhero",
"superpower",
"gender",
"hero_power"
] | 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' | moderate | ability of Phoenix Force refers to power_name = 'Phoenix Force'; |
826 | superhero | [
"publisher",
"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 | simple | heaviest refers to MAX(weight_kg); DC Comics refers to publisher_name = 'DC Comics'; superhero refers to superhero_name; |
827 | superhero | [
"publisher",
"superhero",
"race"
] | 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' | moderate | average = AVG(height_cm); non-human superhero refers to race <> 'Human'; Dark Horse Comics refers to publisher_name = 'Dark Horse Comics'; |
828 | superhero | [
"attribute",
"superhero",
"hero_attribute"
] | 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' ORDER BY T1.attribute_value DESC LIMIT 1 | simple | fastest refers to attribute_value = 100 WHERE attribute_name = 'Speed'; |
829 | superhero | [
"publisher",
"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 | challenging | DC refers to publisher_name = 'DC Comics'; Marvel Comics refers to publisher_name = 'Marvel Comics'; if SUM(publisher_name = 'DC Comics') > SUM(publisher_name = 'Marvel Comics'), it means DC Comics published more superheroes than Marvel Comics; if SUM(publisher_name = 'Marvel Comics') > SUM(publisher_name = 'Marvel Comics'), it means Marvel Comics published more heroes than DC Comics; difference = SUBTRACT(SUM(publisher_name = 'DC Comics'), SUM(publisher_name = 'Marvel Comics')); |
830 | superhero | [
"attribute",
"superhero",
"hero_attribute"
] | 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 | moderate | weakest attribute refers to attribute_name WHERE MIN(attribute_value); Black Panther refers to superhero_name = 'Black Panther'; |
831 | superhero | [
"superhero",
"colour"
] | 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' | simple | Abomination refers to superhero_name = 'Abomination'; eye colour refers to colour.colour where eye_colour_id = colour.id; |
832 | superhero | [
"superhero"
] | Name the tallest superhero. | SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1 | simple | tallest superhero refers to MAX(height_cm); |
833 | superhero | [
"superhero"
] | Name the superhero, otherwise known as Charles Chandler. | SELECT superhero_name FROM superhero WHERE full_name = 'Charles Chandler' | simple | name the superhero refers to superhero_name; Charles Chandler is the full name of superhero; |
834 | superhero | [
"publisher",
"superhero",
"gender"
] | 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' | challenging | created by George Lucas refers to publisher_name = 'George Lucas'; percentage = MULTIPLY(DIVIDE(SUM(gender = 'Female' WHERE publisher_name = 'George Lucas'), COUNT(publisher_name = 'George Lucas')), 100.0); female refers to gender = 'Female'; |
835 | superhero | [
"publisher",
"superhero",
"alignment"
] | 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' | challenging | Marvel Comics refers to publisher_name = 'Marvel Comics'; percentage = MULTIPLY(DIVIDE(SUM(alignment = 'Good' WHERE publisher_name = 'Marvel Comics'), COUNT(publisher_name = 'Marvel Comics')), 100.0); good superheroes refers to alignment = 'Good'; |
836 | superhero | [
"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%' | simple | have John as their first name refers to full_name LIKE 'John%'; |
837 | superhero | [
"hero_attribute"
] | 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 ) | simple | lowest attribute value refers to MIN(attribute_value); |
838 | superhero | [
"superhero"
] | Provide the full name of the superhero named Alien. | SELECT full_name FROM superhero WHERE superhero_name = 'Alien' | simple | |
839 | superhero | [
"superhero",
"colour"
] | 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' | simple | weight less than 100 refers to weight_kg < 100 |
840 | superhero | [
"superhero",
"hero_attribute"
] | 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' | simple | |
841 | superhero | [
"superhero",
"race"
] | 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 | simple | weight refers to weight_kg; superhero ID 40 refers to superhero.id = 40; |
842 | superhero | [
"superhero",
"alignment"
] | 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' | simple | |
843 | superhero | [
"superpower",
"hero_power"
] | 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' | simple | hero ID refers to superhero.id; have intelligence as their power refers to power_name = 'Intelligence'; |
844 | superhero | [
"superhero",
"colour"
] | 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' | simple | eye colour refers to colour.colour where eye_colour_id = colour.id; Blackwulf refers to superhero_name = 'Blackwulf'; |
845 | superhero | [
"superhero",
"superpower",
"hero_power"
] | 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 | moderate | power of superheroes refers to power_name; height greater than 80% of the average height of all superheroes = height_cm > MULTIPLY(AVG(height_cm), 0.8); |
846 | formula_1 | [
"qualifying",
"drivers"
] | Please list the reference names of the drivers who are eliminated in the first period in race number 18. | SELECT T2.driverRef FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 18 ORDER BY T1.q1 DESC LIMIT 5 | moderate | driver reference name refers to driverRef; first qualifying period refers to q1; drivers who are eliminated in the first qualifying period refers to 5 drivers with MAX(q1); race number refers to raceId; |
847 | formula_1 | [
"qualifying",
"drivers"
] | What is the surname of the driver with the best lap time in race number 19 in the second period? | SELECT T2.surname FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 19 AND T1.q2 IS NOT NULL ORDER BY T1.q2 ASC LIMIT 1 | simple | race number refers to raceId; second qualifying period refers to q2; best lap time refers to MIN(q2); |
848 | formula_1 | [
"races",
"circuits"
] | 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' | simple | Shanghai is a name of location; |
849 | formula_1 | [
"races",
"circuits"
] | 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' | simple | introduction of races refers to url; Circuit de Barcelona-Catalunya is a name of circuit; |
850 | formula_1 | [
"races",
"circuits"
] | 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' | simple | Germany is a name of country; |
851 | formula_1 | [
"constructors",
"constructorStandings"
] | 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' | simple | Renault is a name of constructor; |
852 | formula_1 | [
"races",
"circuits"
] | 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 = 2010 | moderate | |
853 | formula_1 | [
"races",
"circuits"
] | 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' | simple | Spain is a name of country; |
854 | formula_1 | [
"races",
"circuits"
] | What is the location coordinates 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' | simple | coordinates refers to (lat, lng); |
855 | formula_1 | [
"races",
"circuits"
] | 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' | simple | information about races refers to url; |
856 | formula_1 | [
"races",
"circuits"
] | 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' | simple | |
857 | formula_1 | [
"races",
"circuits"
] | Give the coordinate position for Abu Dhabi Grand Prix. | SELECT DISTINCT T1.lat, T1.lng, T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Abu Dhabi Grand Prix' | simple | coordinates refers to (lat, lng); position and location shares the same meaning. |
858 | formula_1 | [
"constructorResults",
"constructors"
] | 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 | simple | race number refers to raceId; |
859 | formula_1 | [
"qualifying",
"drivers"
] | 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' | simple | race number refers to raceId; |
860 | formula_1 | [
"qualifying",
"drivers"
] | 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%' | simple | race number refers to raceId; |
861 | formula_1 | [
"qualifying",
"drivers"
] | 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%' | simple | race number refers to raceId; |
862 | formula_1 | [
"results",
"drivers",
"races"
] | 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 | simple | drivers who finished the race refers to time has records; |
863 | formula_1 | [
"seasons",
"races"
] | 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 | simple | race number refers to raceId; |
864 | formula_1 | [
"results",
"races"
] | 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 | simple | game and race are synonyms; drivers who finished the race should have record in time; |
865 | formula_1 | [
"results",
"drivers"
] | 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 | moderate | drivers who finished the race refers to time is not empty; oldest driver refers to oldest dob; |
866 | formula_1 | [
"drivers",
"lapTimes"
] | 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%' | moderate | player and driver are synonyms; race number refers to raceId; introduction website of the drivers refers to url; |
867 | formula_1 | [
"results",
"drivers"
] | 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 | simple | fastest lap speed refers to MAX(fastestLapSpeed); |
868 | formula_1 | [
"races",
"circuits"
] | 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' | simple | coordinates refers to (lat, lng); |
869 | formula_1 | [
"constructorResults",
"constructors"
] | 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 | moderate | race number refers to raceId; introduction website of the constructor refers to url; |
870 | formula_1 | [
"qualifying",
"drivers"
] | 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' | simple | race number refers to raceId; |
871 | formula_1 | [
"qualifying",
"drivers"
] | 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%' | simple | race number refers to raceId; |
872 | formula_1 | [
"qualifying",
"drivers"
] | 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%' | simple | race number refers to raceId; |
873 | formula_1 | [
"results",
"drivers"
] | 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' | simple | race number refers to raceId; |
874 | formula_1 | [
"results",
"drivers",
"races"
] | 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 | simple | finished second refers to position = 2; |
875 | formula_1 | [
"seasons",
"races"
] | 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 | simple | race number refers to raceId; |
876 | formula_1 | [
"results",
"races"
] | For the race happened in 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 | simple | |
877 | formula_1 | [
"results",
"drivers"
] | 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 | moderate | race number refers to raceId; drivers who finished the race refers to time has value; the youngest is a driver where MAX(dob); |
878 | formula_1 | [
"drivers",
"lapTimes"
] | 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 | simple | race number refers to raceId; the best lap time refers to MIN(time) |
879 | formula_1 | [
"results",
"drivers"
] | 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 WHERE T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapSpeed DESC LIMIT 1 | moderate | the fastest lap speed refers to (MAX) fastestLapSpeed
SQL mentions raceId = 348, that is not in the question |
880 | formula_1 | [
"results",
"drivers"
] | 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' | challenging | race number refers to raceId; DIVIDE(SUBTRACT(fastestLapSpeed(raceId = 853), (fastestLapSpeed (raceId = 854)), (fastestLapSpeed(raceId = 853)) as percentage |
881 | formula_1 | [
"results",
"races"
] | 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' | moderate | DIVIDE(COUNT(driverid where time has value and date = '1983-07-16'), (COUNT(driverid where date = '1983-07-16')) as percentage |
882 | formula_1 | [
"races"
] | Which year was the first Singapore Grand Prix? | SELECT year FROM races WHERE name = 'Singapore Grand Prix' ORDER BY year ASC LIMIT 1 | simple | the first race refers to race happened in min(year); |
883 | formula_1 | [
"races"
] | 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 | simple | |
884 | formula_1 | [
"races"
] | Name the first race recorded. What are the other races that happened within the same month and year of that race. | 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 ) | moderate | the first race refers to year = year(min(date)) and month = month(min(date)); |
885 | formula_1 | [
"races"
] | 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 | simple | the last round refers to max(round); |
886 | formula_1 | [
"races"
] | Which year has the most number of races? | SELECT year FROM races GROUP BY year ORDER BY COUNT(round) DESC LIMIT 1 | simple | the most number of races refers to max(round); |
887 | formula_1 | [
"races"
] | 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 ) | simple | not hosted means not in; |
888 | formula_1 | [
"races",
"circuits"
] | 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 | simple | the first refers to min(year); |
889 | formula_1 | [
"races",
"circuits"
] | 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 | simple | the last refers to max(year); |
890 | formula_1 | [
"races",
"circuits"
] | 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' | simple | British Grand Prix is the name of race; British refers to the United Kindom |
891 | formula_1 | [
"driverStandings",
"drivers",
"races"
] | 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 | simple | |
892 | formula_1 | [
"driverStandings",
"drivers",
"races"
] | 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 | moderate | the most points scored refers to max(points); full name contains forename and surname. |
893 | formula_1 | [
"driverStandings",
"drivers",
"races"
] | 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 | simple | |
894 | formula_1 | [
"lapTimes",
"drivers",
"races"
] | 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 | moderate | the best lap time refers to min(time) |
895 | formula_1 | [
"drivers",
"lapTimes",
"races"
] | What is the average lap time for Sebastian Vettel in the 2009 Chinese 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 = 'Sebastian' AND T3.surname = 'Vettel' AND T1.year = 2009 AND T1.name = 'Chinese GrAND Prix' | moderate | AVG(time); |
896 | formula_1 | [
"driverStandings",
"drivers",
"races"
] | 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 | challenging | DIVIDE(COUNT(raceId) where surname = 'Hamilton', year >= 2010 and position>1), (COUNT(raceId) where surname = 'Hamilton', year >= 2010) as percentage; |
897 | formula_1 | [
"driverStandings",
"drivers"
] | Name the driver with the most winning. Mention his nationality and what is his average point scores. | SELECT T1.forename, T1.surname, T1.nationality, AVG(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 | moderate | the most winning refers to MAX(COUNT(wins)); avg(points); |
898 | formula_1 | [
"drivers"
] | 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 | simple | youngest Japanese driver refers to max(dob); Japanese refers to nationality = 'Japanese'; age = 2022-year(dob)+1
|
899 | formula_1 | [
"races",
"circuits"
] | 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 | moderate | from year 1990 to 2000 refers to year(date) between 1990 and 2000; |