birdsql/bird_sql_dev_20251106 huggingface dataset:
Database: superhero
Question: What are the names of the superheroes with the power of death touch?
Evidence: name of superheroes refers to refers to superhero_name; the power of death touch refers to power_name = 'Death Touch'
SQL:
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 = 'Death Touch'
Database: superhero
Question: How many female superheroes have a strength value of 100?
Evidence: female refers to gender = 'Female'; strength value of 100 refers to attribute_name = 'Strength' AND attribute_value = 100
SQL:
SELECT COUNT(T1.id) 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 INNER JOIN gender AS T4 ON T1.gender_id = T4.id WHERE T3.attribute_name = 'Strength' AND T2.attribute_value = 100 AND T4.gender = 'Female'
Database: superhero
Question: What is the name of the superhero that has the most powers?
Evidence: name of the superhero refers to superhero_name; superhero that has the most powers refers to MAX(COUNT(superhero_name))
SQL:
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id GROUP BY T1.superhero_name ORDER BY COUNT(T2.hero_id) DESC LIMIT 1
Database: superhero
Question: How many vampire superheroes are there?
Evidence: vampire superheroes refers to race = 'Vampire'
SQL:
SELECT COUNT(T1.superhero_name) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Vampire'
Database: superhero
Question: What is the percentage of superheroes who act in their own self-interest or make decisions based on their own moral code? Indicate how many of the said superheroes were published by Marvel Comics.
Evidence: published by Marvel Comics refers to publisher_name = 'Marvel Comics'; superheroes who act in their own self-interest or make decisions based on their own moral code refers to alignment = 'Bad'; calculation = MULTIPLY(DIVIDE(SUM(alignment = 'Bad); count(id)), 100)
SQL:
SELECT (CAST(COUNT(*) AS REAL) * 100 / (SELECT COUNT(*) FROM superhero)), CAST(SUM(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) AS REAL) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN alignment AS T3 ON T3.id = T1.alignment_id WHERE T3.alignment = 'Bad'
Database: superhero
Question: Between DC and Marvel Comics, which publisher has published more superheroes? Find the difference in the number of superheroes they have published.
Evidence: DC refers to publisher_name = 'DC Comics'; Marvel Comics refers to publisher_name = 'Marvel Comics'; calculation = SUBTRACT(SUM(publisher_name = 'Marvel Comics'), SUM(publisher_name = 'DC Comics'))
SQL:
SELECT SUM(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.publisher_name = 'DC Comics' THEN 1 ELSE 0 END) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id
Database: superhero
Question: Give the publisher ID of Star Trek.
SQL:
SELECT id FROM publisher WHERE publisher_name = 'Star Trek'
Database: superhero
Question: Calculate the average attribute value of all superheroes.
Evidence: average attribute value of all superheroes refers to AVG(attribute_value)
SQL:
SELECT AVG(attribute_value) FROM hero_attribute
Database: superhero
Question: What is the total number of superheroes without full name?
Evidence: superheroes without full name refers to full_name IS NULL
SQL:
SELECT COUNT(id) FROM superhero WHERE full_name IS NULL
Database: superhero
Question: What is the eye colour of superhero with superhero ID 75?
Evidence: eye colour refers to colour where eye_colour_id = colour.id;
SQL:
SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.id = 75
Database: superhero
Question: Provide the superpowers of the superhero called Deathlok.
Evidence: superpowers refers to power_name; Deathlok refers to superhero_name = 'Deathlok'
SQL:
SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.superhero_name = 'Deathlok'
Database: superhero
Question: What is the average weight of all female superheroes?
Evidence: female refers to gender = 'Female'; average weight refers to AVG(weight_kg)
SQL:
SELECT AVG(T1.weight_kg) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T2.gender = 'Female'
Database: superhero
Question: List down at least five superpowers of male superheroes.
Evidence: male refers to gender = 'Male'; superpowers refers to power_name;
SQL:
SELECT T3.power_name
FROM superhero AS T1
INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id
INNER JOIN superpower AS T3 ON T3.id = T2.power_id
INNER JOIN gender AS T4 ON T4.id = T1.gender_id
WHERE T4.gender = 'Male'
LIMIT 5;
Database: superhero
Question: Give the name of the alien superheroes.
SQL:
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Alien'
Database: superhero
Question: Among the superheroes with height from 170 to 190, list the names of the superheroes with no eye color.
Evidence: height from 170 to 190 refers to height in centimeters between 170 and 190; no eye color is labeled as 'No Colour' in the database
SQL:
SELECT DISTINCT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.height_cm BETWEEN 170 AND 190 AND T2.colour = 'No Colour'
Database: superhero
Question: What is the superpower of hero ID 56?
SQL:
SELECT T2.power_name FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T1.hero_id = 56
Database: superhero
Question: List down at least five full name of Demi-God superheroes.
Evidence: Demi-God superheroes refers to race = 'Demi-God'
SQL:
SELECT T1.full_name FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Demi-God'
Database: superhero
Question: How many bad superheroes are there?
Evidence: bad superheroes refers to alignment_id = Bad
SQL:
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Bad'
Database: superhero
Question: Identify the race of the superhero who weighed 169 kg.
SQL:
SELECT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.weight_kg = 169
Database: superhero
Question: Provide the hair colour of the human superhero who is 185 cm tall.
Evidence: 185 cm tall refers to height_cm = 185; human superhero refers to race = 'human'; hair colour refers to colour where hair_colour_id = colour.id;
SQL:
SELECT DISTINCT T3.colour FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id INNER JOIN colour AS T3 ON T1.hair_colour_id = T3.id WHERE T1.height_cm = 185 AND T2.race = 'Human'
Database: superhero
Question: What is the eye clolour of the heaviest superhero?
Evidence: the heaviest superhero refers to MAX(weight_kg); eye colour refers to colour where eye_colour_id = colour.id;
SQL:
SELECT T2.colour
FROM superhero AS T1
INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id
ORDER BY T1.weight_kg DESC
LIMIT 1;
Database: superhero
Question: In superheroes with height between 150 to 180, what is the percentage of heroes published by Marvel Comics?
Evidence: heroes published by Marvel Comics refers to publisher_name = 'Marvel Comics'; percentage is calculated as (Marvel Comics heroes / total heroes) * 100
SQL:
SELECT CAST(COUNT(CASE WHEN T2.publisher_name = 'Marvel Comics' 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 WHERE T1.height_cm BETWEEN 150 AND 180
Database: superhero
Question: Among the male superheroes, list the super hero names of superheroes with weight greater than the 79% average weight of all superheroes.
Evidence: super hero names refers to superhero_name;male superheros refers to gender = 'Male';Calculation = weight_kg > MULTIPLY(AVG(weight_kg), 0.79)
SQL:
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T2.gender = 'Male' AND T1.weight_kg * 100 > ( SELECT AVG(weight_kg) FROM superhero ) * 79
Database: superhero
Question: Which power do superheroes have the most of?
Evidence: power that superheroes have the most refers to MAX(COUNT(power_name))
SQL:
SELECT T2.power_name FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id GROUP BY T2.power_name ORDER BY COUNT(T1.hero_id) DESC LIMIT 1
Database: superhero
Question: Indicate the attribute value of superhero Abomination.
Evidence: Abomination refers to superhero_name = 'Abomination';
SQL:
SELECT a.attribute_name AS hero_attribute_name, ha.attribute_value AS hero_attribute_value FROM superhero s INNER JOIN hero_attribute ha ON s.id = ha.hero_id INNER JOIN attribute a ON ha.attribute_id = a.id WHERE s.superhero_name = 'Abomination';
Database: superhero
Question: What are the superpowers of heroes with ID 1?
SQL:
SELECT DISTINCT T2.power_name FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T1.hero_id = 1
Database: superhero
Question: How many heroes have stealth power?
SQL:
SELECT COUNT(T1.hero_id) FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T2.power_name = 'Stealth'
Database: superhero
Question: What is the hero's full name with the highest attribute in strength?
Evidence: highest attribute in strength refers to MAX(attribute_value) WHERE attribute_name = 'strength';
SQL:
SELECT T1.full_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 T3.attribute_name = 'Strength' ORDER BY T2.attribute_value DESC LIMIT 1
Database: superhero
Question: What is the proportion of superheroes with no skin colour?
Evidence: no skin colour refers to skin_colour_id = 1 where colour is 'No Colour'; proportion is calculated as the number of superheroes with no skin colour divided by the total number of superheroes.
SQL:
SELECT CAST(SUM(CASE WHEN skin_colour_id = 1 THEN 1 ELSE 0 END) AS REAL) / COUNT(*) FROM superhero
Database: superhero
Question: How many superheroes were published by Dark Horse Comics?
Evidence: [Remove Evidence]
SQL:
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Dark Horse Comics'
Database: superhero
Question: Which superhero has the most durability published by Dark Horse Comics?
Evidence: most durability refers to MAX(attribute_value) WHERE attribute_name = 'Durability'; published by Dark Horse Comics refers to publisher_name = 'Dark Horse Comics'
SQL:
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T3.id = T2.attribute_id INNER JOIN publisher AS T4 ON T4.id = T1.publisher_id WHERE T4.publisher_name = 'Dark Horse Comics' AND T3.attribute_name = 'Durability' ORDER BY T2.attribute_value DESC, T1.superhero_name ASC LIMIT 1
Database: superhero
Question: What is the eyes colour of Abraham Sapien?
Evidence: eye colour refers to colour.colour where eye_colour_id = colour.id; Abraham Sapien is the full name of superhero;
SQL:
SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.full_name = 'Abraham Sapien'
Database: superhero
Question: List the name of superheroes with flight power.
Evidence: name of superheroes refers to superhero_name; flight power refers to power_name = 'Flight';
SQL:
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 = 'Flight'
Database: superhero
Question: List the eyes, hair and skin colour of all female superheroes published by Dark Horse Comics.
Evidence: eyes refers to eye_colour_id; hair refers to hair_colour_id; skin colour refers to skin_colour_id; female superheroes refers to gender = 'Female'; published by Dark Horse Comics refers to publisher_name = 'Dark Horse Comics';
SQL:
SELECT T1.eye_colour_id, T1.hair_colour_id, T1.skin_colour_id FROM superhero AS T1 INNER JOIN publisher AS T2 ON T2.id = T1.publisher_id INNER JOIN gender AS T3 ON T3.id = T1.gender_id WHERE T2.publisher_name = 'Dark Horse Comics' AND T3.gender = 'Female'
Database: superhero
Question: Which superhero has the same eyes, hair and skin colour? Indicate the publisher of the superhero.
Evidence: which superhero refers to superhero_name; the same eyes, hair and skin colour refers to hair_colour_id = skin_colour_id AND hair_colour_id = eye_colour_id; publisher refers to publisher_name;
SQL:
SELECT T1.superhero_name, T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.eye_colour_id = T1.hair_colour_id AND T1.eye_colour_id = T1.skin_colour_id
Database: superhero
Question: Which group does superhero A-Bomb belong to?
Evidence: group refers to race; A-Bomb refers to superhero_name = 'A-Bomb';
SQL:
SELECT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.superhero_name = 'A-Bomb'
Database: superhero
Question: What is the percentage of blue female superheroes among all female superheroes?
Evidence: blue refers to skin color and represented as 'Blue' in the data; female is represented as 'Female' in the data;
SQL:
SELECT CAST(COUNT(CASE WHEN T3.colour = 'Blue' THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id INNER JOIN colour AS T3 ON T1.skin_colour_id = T3.id WHERE T2.gender = 'Female'
Database: superhero
Question: Provide the hero name and race of Charles Chandler.
Evidence: hero name refers to superhero_name; Charles Chandler is the full name of superhero;
SQL:
SELECT T1.superhero_name, T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.full_name = 'Charles Chandler'
Database: superhero
Question: What is the gender of Agent 13 hero?
Evidence: Agent 13 hero refers to superhero_name = 'Agent 13';
SQL:
SELECT T2.gender FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T1.superhero_name = 'Agent 13'
Database: superhero
Question: Provide superheroes' names who have the adaptation power.
Evidence: adaptation power refers to power_name = 'Adaptation';
SQL:
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 = 'Adaptation'
Database: superhero
Question: How many powers does Amazo hero have?
Evidence: Amazo hero refers to superhero_name = 'Amazo';
SQL:
SELECT COUNT(T1.power_id) FROM hero_power AS T1 INNER JOIN superhero AS T2 ON T1.hero_id = T2.id WHERE T2.superhero_name = 'Amazo'
Database: superhero
Question: List the powers of Hunter Zolomon.
Evidence: Hunter Zolomon is the full name of superhero; list the powers refers to power_name;
SQL:
SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.full_name = 'Hunter Zolomon'
Database: superhero
Question: Provide the heights of the heroes whose eye colours are amber.
SQL:
SELECT T1.height_cm FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T2.colour = 'Amber'
Database: superhero
Question: List the heroes' names whose eyes and hair colours are both black.
Evidence: heroes' names refers to superhero_name; eyes and hair colours are both black refer to eye_colour_id and hair_colour_id are both black;
SQL:
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id AND T1.hair_colour_id = T2.id WHERE T2.colour = 'Black'
Database: superhero
Question: Provide the eye colours of the heroes whose skin colours are gold.
Evidence: skin colours are gold refers to colour.colour = 'Gold' WHERE skin_colour_id = colour.id;
SQL:
SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id INNER JOIN colour AS T3 ON T1.skin_colour_id = T3.id WHERE T3.colour = 'Gold'
Database: superhero
Question: Provide the full names of vampire heroes.
Evidence: vampire heroes refers to race = 'Vampire';
SQL:
SELECT T1.full_name FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Vampire'
Database: superhero
Question: Describe the names of neutral alignment superheroes.
Evidence: names of superheroes refers to superhero_name; neutral alignment refers to alignment = 'Neutral';
SQL:
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'
Database: superhero
Question: How many heroes have the highest attribute value in strength?
Evidence: highest attribute value in strength refers to MAX(attribute_value) WHERE attribute_name = 'Strength';
SQL:
SELECT COUNT(T1.hero_id) FROM hero_attribute AS T1 INNER JOIN attribute AS T2 ON T1.attribute_id = T2.id WHERE T2.attribute_name = 'Strength' AND T1.attribute_value = ( SELECT MAX(attribute_value) FROM hero_attribute )
Database: superhero
Question: What are the race and alignment of Cameron Hicks?
Evidence: Cameron Hicks refers to superhero_name = 'Cameron Hicks';
SQL:
SELECT T2.race, T3.alignment FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id INNER JOIN alignment AS T3 ON T1.alignment_id = T3.id WHERE T1.superhero_name = 'Cameron Hicks'
Database: superhero
Question: How many percent of female heroes were published by Marvel Comics?
Evidence: percent = MULTIPLY(DIVIDE(SUM(gender = 'Female' WHERE publisher_name = 'Marvel Comics'), COUNT(publisher_name = 'Marvel Comics')), 100); female heroes refers to gender = 'Female'; Marvel Comics refers to publisher_name = 'Marvel Comics';
SQL:
SELECT CAST(COUNT(CASE WHEN T2.publisher_name = 'Marvel Comics' 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 T3.gender = 'Female'
Database: superhero
Question: Find the average weight of the heroes who are aliens.
Evidence: average = AVG(weight_kg); aliens refers to race = 'Alien';
SQL:
SELECT CAST(SUM(T1.weight_kg) AS REAL) / COUNT(T1.id) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Alien'
Database: superhero
Question: Calculate the difference between Emil Blonsky's weight and Charles Chandler's weight.
Evidence: Emil Blonsky and Charles Chandler are the full names of superheros;
SQL:
SELECT ( SELECT weight_kg FROM superhero WHERE full_name LIKE 'Emil Blonsky' ) - ( SELECT weight_kg FROM superhero WHERE full_name LIKE 'Charles Chandler' ) AS CALCULATE
Database: superhero
Question: Calculate the average height for each superhero.
Evidence: average = DIVIDE(SUM(height_cm), COUNT(all heros));
SQL:
SELECT CAST(SUM(height_cm) AS REAL) / COUNT(id) FROM superhero
Database: superhero
Question: What is Abomination's superpower?
Evidence: Abomination refers to superhero_name = 'Abomination'; superpower refers to power_name;
SQL:
SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.superhero_name = 'Abomination'
Database: superhero
Question: Among the superheroes with the race of god/eternal, how many of them are male
Evidence: race "god/eternal" refers to race_id = 21; male refers to gender.id = 1
SQL:
SELECT COUNT(*) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id INNER JOIN gender AS T3 ON T3.id = T1.gender_id WHERE T1.race_id = 21 AND T1.gender_id = 1
Database: superhero
Question: Which hero was the fastest?
Evidence: The fastest hero is the one with the highest speed value.
SQL:
SELECT T1.superhero_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 T3.attribute_name = 'Speed' ORDER BY T2.attribute_value DESC, T1.id ASC LIMIT 1
Database: superhero
Question: How many superheroes have a neutral alignment?
Evidence: neutral alignment refers to alignment_id = 3;
SQL:
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'
Database: superhero
Question: State all of 3-D Man's attributes along with their values.
Evidence: 3-D Man is the superhero_name. attributes refers to attribute_name; values refers to attribute_value;
SQL:
SELECT T3.attribute_name, 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 = '3-D Man'
Database: superhero
Question: Which superheroes have blue eyes with brown hair?
Evidence: blue eyes refers to eye_colour_id; brown hair refers to hair_colour_id; both colors are stored in the colour table
SQL:
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id INNER JOIN colour AS T3 ON T1.hair_colour_id = T3.id WHERE T2.colour = 'Blue' AND T3.colour = 'Brown'
Database: superhero
Question: What is the publisher for Hawkman, Karate Kid and Speedy?
Evidence: publisher refers to publisher_name; Hawkman refers to superhero_name = 'Hawkman'; Karate Kid refers to superhero_name = 'Karate Kid'; Speedy refers to superhero_name = 'Speedy';
SQL:
SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.superhero_name IN ('Hawkman', 'Karate Kid', 'Speedy')
Database: superhero
Question: How many superheroes didn't have any publisher?
Evidence: didn't have any publisher refers to publisher.id = 1;
SQL:
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.id = 1
Database: superhero
Question: Calculate the percentage of superheroes with blue eyes.
Evidence: percentage = MULTIPLY(DIVIDE(SUM(superhero_name WHERE color = 'Blue'), COUNT(superhero_name)), 100.0);
SQL:
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
Database: superhero
Question: Find the ratio between male superheroes and female superheroes.
Evidence: ratio = DIVIDE(SUM(gender_id = 1) / SUM(gender_id = 2)); male superheroes refers to gender = 'Male'; female superheroes refers to gender = 'Female';
SQL:
SELECT CAST(COUNT(CASE WHEN T2.gender = 'Male' THEN T1.id ELSE NULL END) AS REAL) / NULLIF(COUNT(CASE WHEN T2.gender = 'Female' THEN T1.id ELSE NULL END), 0) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id
Database: superhero
Question: Who is the tallest superhero?
Evidence: who refers to superhero_name; tallest superhero refers to MAX(height_cm);
SQL:
SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1
Database: superhero
Question: What is the power ID of cryokinesis?
Evidence: power ID refers to superpower.id; cryokinesis refers to power_name = 'cryokinesis';
SQL:
SELECT id FROM superpower WHERE power_name = 'Cryokinesis'
Database: superhero
Question: Provide the name of superhero with superhero ID 294.
Evidence: name of superhero refers to superhero_name; superhero ID 294 refers to superhero.id = 294;
SQL:
SELECT superhero_name FROM superhero WHERE id = 294
Database: superhero
Question: List the full names of superheroes with missing weight.
Evidence: missing weight refers to weight_kg = 0 OR weight_kg = NULL;
SQL:
SELECT DISTINCT full_name FROM superhero WHERE full_name IS NOT NULL AND (weight_kg IS NULL OR weight_kg = 0)
Database: superhero
Question: Provide the eye colour of the superhero who has Karen Beecher-Duncan as their full name.
Evidence: eye colour refers to colour.colour where eye_colour_id = colour.id
SQL:
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'
Database: superhero
Question: What is the superpowers of the superhero has Helen Parr as their full name?
Evidence: superpowers refers to power_name; Helen Parr is the full name of superhero;
SQL:
SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.full_name = 'Helen Parr'
Database: superhero
Question: Find the race of the superhero who weighs 108kg and is 188cm tall.
SQL:
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
Database: superhero
Question: What is the publisher name of the superhero ID 38?
SQL:
SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.id = 38
Database: superhero
Question: What is the most common race of the superhero with maximum attribute value?
Evidence: maximum attribute value refers to MAX(attribute_value);most common race refers to race with MAX(COUNT(*))
SQL:
SELECT r.race
FROM superhero s
JOIN hero_attribute ha ON s.id = ha.hero_id
JOIN race r ON s.race_id = r.id
WHERE ha.attribute_value = (SELECT MAX(attribute_value) FROM hero_attribute)
GROUP BY r.race 
ORDER BY COUNT(*) DESC
LIMIT 1;
Database: superhero
Question: Give the alignment and superpowers of the superhero named Atom IV.
Evidence: superpowers refers to power_name;
SQL:
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'
Database: superhero
Question: List down at least five full names of superheroes with blue eyes.
Evidence: blue eyes refers to colour.colour = 'Blue' WHERE eye_colour_id = colour.id; Name of superheroes refers to superhero_name;
SQL:
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
Database: superhero
Question: Calculate the average attribute value of all neutral superheroes.
Evidence: neutral superheroes refers to alignment_id = 3
SQL:
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'
Database: superhero
Question: List the skin colour of the superheroes with 100 attribute value.
Evidence: [Remove Evidence]
SQL:
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
Database: superhero
Question: Count the good female superheroes.
Evidence: good refers to alignment.id = 1; female refers to gender.id = 2;
SQL:
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'
Database: superhero
Question: Provide the names of superheroes with attribute value between 75 to 80.
Evidence: names of superheroes refers to superhero_name; attribute value between 75 to 80 refers to attribute_value BETWEEN 75 AND 80;
SQL:
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
Database: superhero
Question: Give the race of the blue-haired male superhero.
SQL:
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'
Database: superhero
Question: Among the bad superheroes, what is the percentage of female superheroes?
Evidence: 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;
SQL:
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'
Database: superhero
Question: In superheroes with missing weight data, calculate the difference between the number of superheroes with blue eyes and no eye color.
Evidence: 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;
SQL:
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;
Database: superhero
Question: How strong is the Hulk?
Evidence: how strong refers to attribute_value WHERE attribute_name = 'Strength'; the Hulk refers to superhero_name = 'Hulk';
SQL:
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'
Database: superhero
Question: List down Ajax's superpowers.
Evidence: [Remove Evidence]
SQL:
SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.superhero_name = 'Ajax'
Database: superhero
Question: How many green-skinned villains are there in the superhero universe?
Evidence: green-skinned refers to colour.colour = 'Green' WHERE skin_colour_id = colour.id; villains refers to alignment = 'Bad';
SQL:
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'
Database: superhero
Question: How many female superheroes are in Marvel Comics?
Evidence: female refers to gender = 'Female'; Marvel Comics refers to publisher_name = 'Marvel Comics';
SQL:
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'
Database: superhero
Question: Identify superheroes who can control wind and list their names in alphabetical order.
Evidence: superheroes refers to superhero_name; can control wind refers to power_name = 'Wind Control';
SQL:
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
Database: superhero
Question: Identify the gender of the superhero who has the ability of Phoenix Force.
SQL:
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'
Database: superhero
Question: Identify the heaviest superhero in DC Comics.
Evidence: heaviest refers to MAX(weight_kg); DC Comics refers to publisher_name = 'DC Comics'; superhero refers to superhero_name;
SQL:
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
Database: superhero
Question: What is the average height of a non-human superhero in Dark Horse Comics?
Evidence: average = AVG(height_cm); non-human superhero refers to race <> 'Human'; Dark Horse Comics refers to publisher_name = 'Dark Horse Comics';
SQL:
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'
Database: superhero
Question: Count the fastest superheroes.
Evidence: fastest refers to attribute_value = 100 WHERE attribute_name = 'Speed';
SQL:
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
Database: superhero
Question: Which publisher created more superheroes: DC or Marvel Comics? Find the difference in the number of superheroes.
Evidence: 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'));
SQL:
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
Database: superhero
Question: Identify the weakest attribute of the Black Panther.
Evidence: weakest attribute refers to attribute_name WHERE MIN(attribute_value); Black Panther refers to superhero_name = 'Black Panther';
SQL:
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
Database: superhero
Question: What is Abomination's eye colour?
Evidence: Abomination refers to superhero_name = 'Abomination'; eye colour refers to colour.colour where eye_colour_id = colour.id;
SQL:
SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.superhero_name = 'Abomination'
Database: superhero
Question: Name the tallest superhero.
Evidence: [Remove Evidence]
SQL:
SELECT superhero_name FROM superhero ORDER BY height_cm DESC, superhero_name ASC LIMIT 1
Database: superhero
Question: Name the superhero, otherwise known as Charles Chandler.
Evidence: name the superhero refers to superhero_name; Charles Chandler is the full name of superhero;
SQL:
SELECT superhero_name FROM superhero WHERE full_name = 'Charles Chandler'
Database: superhero
Question: Among all superheroes created by George Lucas, identify the percentage of female superheroes.
Evidence: created by George Lucas refers to publisher_name = 'George Lucas'; percentage is the ratio of female superheroes to total superheroes multiplied by 100; female refers to gender 'Female'.
SQL:
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'
Database: superhero
Question: Among all superheroes in Marvel Comics, identify the percentage of 'good' superheroes.
Evidence: 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';
SQL:
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 LEFT JOIN alignment AS T3 ON T1.alignment_id = T3.id WHERE T2.publisher_name = 'Marvel Comics'
Database: superhero
Question: What is the total number of superheroes that have John as their first name?
Evidence: have John as their first name refers to full_name LIKE 'John%';
SQL:
SELECT COUNT(id) FROM superhero WHERE full_name LIKE 'John%'
Database: superhero
Question: Give the hero ID of superhero with the lowest attribute value.
Evidence: lowest attribute value refers to MIN(attribute_value);
SQL:
SELECT hero_id FROM hero_attribute WHERE attribute_value = ( SELECT MIN(attribute_value) FROM hero_attribute )
Database: superhero
Question: Provide the full name of the superhero named Alien.
SQL:
SELECT full_name FROM superhero WHERE superhero_name = 'Alien'
Database: superhero
Question: In superheroes with weight less than 100, list the full name of the superheroes with brown eyes.
Evidence: weight less than 100 refers to weight_kg < 100
SQL:
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'
Database: superhero
Question: List the attribute value of the superhero named Aquababy.
SQL:
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'
Database: superhero
Question: Provide the weight and race of the superhero with superhero ID 40.
Evidence: weight refers to weight_kg; superhero ID 40 refers to superhero.id = 40;
SQL:
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
Database: superhero
Question: Calculate the average height of all neutral superheroes.
SQL:
SELECT AVG(T1.height_cm) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'
Database: superhero
Question: List the hero ID of superheroes who have intelligence as their power.
SQL:
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'
Database: superhero
Question: Give the eye colour of Blackwulf.
Evidence: eye colour refers to colour.colour where eye_colour_id = colour.id; Blackwulf refers to superhero_name = 'Blackwulf';
SQL:
SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.superhero_name = 'Blackwulf'
Database: superhero
Question: List the power of superheroes with height greater than 80% of the average height of all superheroes.
Evidence: 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);
SQL:
SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.height_cm * 100 > ( SELECT AVG(height_cm) FROM superhero ) * 80
Database: formula_1
Question: Please list the reference names of the drivers who are eliminated in the first period in race number 20.
Evidence: race number refers to raceId; driver reference name refers to driverRef; The five drivers with the highest q1 times are eliminated in the first qualifying period.
SQL:
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
Database: formula_1
Question: What is the surname of the driver with the best lap time in race number 19 in the second qualifying period?
Evidence: race number refers to raceId; second qualifying period refers to q2; best lap time refers to MIN(q2);
SQL:
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;
Database: formula_1
Question: Please list the year during which the race is held on circuits in Shanghai.
Evidence: Shanghai is a name of location;
SQL:
SELECT T2.year FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.location = 'Shanghai'
Database: formula_1
Question: Where can the introduction of the races held on Circuit de Barcelona-Catalunya be found?
Evidence: introduction of races refers to url; Circuit de Barcelona-Catalunya is a name of circuit;
SQL:
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'
Database: formula_1
Question: Please give the name of the race held on the circuits in Germany.
Evidence: Germany is a name of country;
SQL:
SELECT DISTINCT T2.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'Germany'
Database: formula_1
Question: What positions did constructor Renault achieve in the standings?
Evidence: Renault is a name of constructor.
SQL:
SELECT DISTINCT T1.position FROM constructorStandings AS T1 INNER JOIN constructors AS T2 ON T2.constructorId = T1.constructorId WHERE T2.name = 'Renault'
Database: formula_1
Question: How many races in the year 2010 are held on grand prixs outside Asia and Europe?
SQL:
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
Database: formula_1
Question: Please give the names of the races held on the circuits in Spain.
Evidence: Spain is a name of country;
SQL:
SELECT DISTINCT T2.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'Spain'
Database: formula_1
Question: What is the coordinates location of the circuits for Australian grand prix?
Evidence: coordinate position/location refers to lat, lng; circuits for Australian grand prix refers to races.name = 'Australian Grand Prix'
SQL:
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'
Database: formula_1
Question: Where can I find the information about the races held on Sepang International Circuit?
Evidence: information about races refers to url;
SQL:
SELECT DISTINCT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Sepang International Circuit'
Database: formula_1
Question: Please list the time of the races held on Sepang International Circuit.
SQL:
SELECT DISTINCT T2.`time` FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Sepang International Circuit'
Database: formula_1
Question: Give the coordinate position for Abu Dhabi Grand Prix.
Evidence: coordinate position/location refers to lat, lng; Abu Dhabi Grand Prix refers to races.name = 'Abu Dhabi Grand Prix'
SQL:
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'
Database: formula_1
Question: Which country is the constructor which got 1 point in the race No. 24 from?
Evidence: race number refers to raceId;
SQL:
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
Database: formula_1
Question: What's Bruno Senna's Q1 result in the qualifying race No. 354?
Evidence: 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;
SQL:
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'
Database: formula_1
Question: For the driver who had the Q2 time as 0:01:40 in the qualifying race No. 355, what is his nationality?
Evidence: race number refers to raceId;
SQL:
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%'
Database: formula_1
Question: What is his number of the driver who finished 0:01:54 in the Q3 of qualifying race No.903?
Evidence: race number refers to raceId; finished 0:0M:SS in the Q3 refers to q3 LIKE 'M:SS%'
SQL:
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%'
Database: formula_1
Question: For the Bahrain Grand Prix in 2007, how many drivers not finished the game?
Evidence: Bahrain Grand Prix refers to the name of the race;
Drivers who finished the race refers to time is not empty (i.e. time IS NOT NULL);
SQL:
SELECT COUNT(T2.driverId) FROM races  AS T1 JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.year = 2007 AND T1.name = 'Bahrain Grand Prix' AND T2.time IS NULL;
Database: formula_1
Question: Show me the season page of year when the race No. 901 took place.
Evidence: race number refers to raceId;
SQL:
SELECT T2.url FROM races AS T1 INNER JOIN seasons AS T2 ON T2.year = T1.year WHERE T1.raceId = 901
Database: formula_1
Question: For the race happened on 2015/11/29, how many drivers finished the game?
Evidence: game and race are synonyms; drivers who finished the race should have record in time;
SQL:
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
Database: formula_1
Question: For all the drivers who finished the game in race No. 592, who is the oldest?
Evidence: 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;
SQL:
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, T1.driverId ASC 
LIMIT 1;
Database: formula_1
Question: Who was the player that got the lap time of 0:01:27 in the race No. 161? Show his introduction website.
Evidence: 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;
SQL:
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%';
Database: formula_1
Question: For the driver who set the fastest lap speed in race No.933, where does he come from?
Evidence: fastest lap speed refers to MAX(fastestLapSpeed);
SQL:
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
Database: formula_1
Question: Where is Malaysian Grand Prix held? Give the location coordinates.
Evidence: location coordinates refers to (lat, lng); Malaysian Grand Prix refers to races.name = 'Malaysian Grand Prix'
SQL:
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'
Database: formula_1
Question: For the constructor which got the highest point in the race No. 9 , what is its introduction website?
Evidence: race number refers to raceId; constructor which got the highest point refers to MAX(constructorResults.points); introduction website of the constructor refers to url;
SQL:
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
Database: formula_1
Question: What's Lucas di Grassi's Q1 result in the race No. 345?
Evidence: race number refers to raceId;
SQL:
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'
Database: formula_1
Question: For the driver who had the Q2 time as 0:01:15 in race No. 347, where is he from?
Evidence: race number refers to raceId;
SQL:
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%'
Database: formula_1
Question: In the race No. 45, for the driver who had the Q3 time as 0:01:33, what is his abbreviated code?
Evidence: Had the Q3 time as 0:0M:SS refers to q3 LIKE 'M:SS%'
SQL:
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%'
Database: formula_1
Question: What is the actual finish time for Bruce McLaren in the race No.743?
Evidence: race number refers to raceId;
SQL:
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'
Database: formula_1
Question: Who finished second in the San Marino Grand Prix in 2006?
Evidence: finished second refers to position = 2;
SQL:
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