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