db: superhero

question: Please list all the superpowers of 3-D Man.

evidence: 3-D Man refers to superhero_name = '3-D Man'; 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 T2.power_id = T3.id WHERE T1.superhero_name = '3-D Man'

difficulty: simple


db: superhero

question: How many superheroes have the super power of "Super Strength"?

evidence: super power of "Super Strength" refers to power_name = 'Super Strength'

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 = 'Super Strength'

difficulty: simple


db: superhero

question: Among the superheroes with the super power of "Super Strength", how many of them have a height of over 200cm?

evidence: super power of "Super Strength" refers to power_name = 'Super Strength'; a height of over 200cm refers to height_cm > 200

SQL: SELECT COUNT(T1.id) 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 = 'Super Strength' AND T1.height_cm > 200

difficulty: moderate


db: superhero

question: Please list the full names of all the superheroes with over 15 super powers.

evidence: 15 super powers refers to COUNT(full_name) > 15

SQL: SELECT DISTINCT T1.full_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id GROUP BY T1.full_name HAVING COUNT(T2.power_id) > 15

difficulty: simple


db: superhero

question: How many superheroes have blue eyes?

evidence: blue eyes refers to colour = 'Blue' and eye_colour_id = colour.id;

SQL: SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T2.colour = 'Blue'

difficulty: simple


db: superhero

question: What is the colour of Apocalypse's skin?

evidence: Apocalypse refers to superhero_name = 'Apocalypse'; colour of skin refers to colour where skin_colour_id = colour.id

SQL: SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.skin_colour_id = T2.id WHERE T1.superhero_name = 'Apocalypse'

difficulty: simple


db: superhero

question: Among the superheroes with blue eyes, how many of them have the super power of "Agility"?

evidence: blue eyes refers to colour = 'Blue' and eye_colour_id = colour.id; super power of "Agility" refers to power_name = 'Agility'

SQL: SELECT COUNT(T1.id) 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 colour AS T4 ON T1.eye_colour_id = T4.id WHERE T3.power_name = 'Agility' AND T4.colour = 'Blue'

difficulty: moderate


db: superhero

question: Please list the superhero names of all the superheroes that have blue eyes and blond hair.

evidence: blue eyes refers to colour = 'Blue' and eye_colour_id = colour.id; blond hair refers to colour = 'Blond' and hair_colour_id = colour.id; super power of "Agility" refers to power_name = 'Agility'

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 = 'Blond'

difficulty: challenging


db: superhero

question: How many superheroes are published by Marvel Comics?

evidence: published by 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 WHERE T2.publisher_name = 'Marvel Comics'

difficulty: simple


db: superhero

question: Rank heroes published by Marvel Comics by their height in descending order.

evidence: name refers to superhero_name; the tallest hero refers to MAX(height_cm); published by Marvel Comics refers to publisher_name = 'Marvel Comics'

SQL: SELECT superhero_name, height_cm, RANK() OVER (ORDER BY height_cm DESC) AS HeightRank FROM superhero INNER JOIN publisher ON superhero.publisher_id = publisher.id WHERE publisher.publisher_name = 'Marvel Comics'

difficulty: moderate


db: superhero

question: Who is the publisher of Sauron?

evidence: the publisher refers to publisher_name; Sauron refers to superhero_name = 'Sauron'

SQL: SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.superhero_name = 'Sauron'

difficulty: simple


db: superhero

question: Rank superheroes from Marvel Comics by their eye color popularity, starting with the most common color.

evidence: the superheroes from Marvel Comics refers to publisher_name = 'Marvel Comics'; most common color refers to COUNT(superhero.id) DESC;

SQL: SELECT colour.colour AS EyeColor, COUNT(superhero.id) AS Count, RANK() OVER (ORDER BY COUNT(superhero.id) DESC) AS PopularityRank FROM superhero INNER JOIN colour ON superhero.eye_colour_id = colour.id INNER JOIN publisher ON superhero.publisher_id = publisher.id WHERE publisher.publisher_name = 'Marvel Comics' GROUP BY colour.colour

difficulty: moderate


db: superhero

question: What is the average height of the superheroes from Marvel Comics?

evidence: superheroes from Marvel Comics refers to publisher_name = 'Marvel Comics'; average height of the superheroes refers to AVG(height_cm)

SQL: SELECT AVG(T1.height_cm) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Marvel Comics'

difficulty: simple


db: superhero

question: List the superheroes from Marvel Comics who have the super power of 'Super Strength'.

evidence: the superheroes from Marvel Comics refers to publisher_name = 'Marvel Comics'; super power of "Super Strength" refers to power_name = 'Super Strength';

SQL: SELECT superhero_name FROM superhero AS T1 WHERE EXISTS (SELECT 1 FROM hero_power AS T2 INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T3.power_name = 'Super Strength' AND T1.id = T2.hero_id)AND EXISTS (SELECT 1 FROM publisher AS T4 WHERE T4.publisher_name = 'Marvel Comics' AND T1.publisher_id = T4.id)

difficulty: challenging


db: superhero

question: How many superheroes did DC Comics publish?

evidence: superheroes that DC Comics published refers to publisher_name = 'DC Comics'

SQL: SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'DC Comics'

difficulty: simple


db: superhero

question: Which publisher published the slowest superhero?

evidence: the slowest superhero refers to attribute_name = 'Speed' where MIN(attribute_value); publisher refers to publisher_name

SQL: SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN hero_attribute AS T3 ON T1.id = T3.hero_id INNER JOIN attribute AS T4 ON T3.attribute_id = T4.id WHERE T4.attribute_name = 'Speed' ORDER BY T3.attribute_value LIMIT 1

difficulty: moderate


db: superhero

question: How many gold-eyed superheroes did Marvel Comics publish?

evidence: gold-eyed refers to colour = 'Gold' where eye_colour_id = colour.id; superheroes that Marvel Comics published 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 colour AS T3 ON T1.eye_colour_id = T3.id WHERE T2.publisher_name = 'Marvel Comics' AND T3.colour = 'Gold'

difficulty: moderate


db: superhero

question: What is the publisher's name of Blue Beetle II?

evidence: Blue Beetle II refers to superhero_name = 'Blue Beetle II'

SQL: SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.superhero_name = 'Blue Beetle II'

difficulty: simple


db: superhero

question: How many superheroes with blonde hair are there?

evidence: superheroes with blonde hair refers to colour = 'Blond' where hair_colour_id = colour.id

SQL: SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.hair_colour_id = T2.id WHERE T2.colour = 'Blond'

difficulty: simple


db: superhero

question: Who is the dumbest superhero?

evidence: the dumbest superhero refers to MIN(attribute_value) where attribute_name = 'Intelligence'

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 = 'Intelligence' ORDER BY T2.attribute_value LIMIT 1

difficulty: moderate


db: superhero

question: What is Copycat's race?

evidence: Copycat is the superhero_name;

SQL: SELECT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.superhero_name = 'Copycat'

difficulty: simple


db: superhero

question: Which superheroes have a durability attribute value of less than 50?

evidence: durability of less than 50 refers to attribute_name = 'Durability' AND attribute_value < 50

SQL: SELECT superhero_name FROM superhero AS T1 WHERE EXISTS (SELECT 1 FROM hero_attribute AS T2 INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T3.attribute_name = 'Durability' AND T2.attribute_value < 50 AND T1.id = T2.hero_id)

difficulty: simple


db: 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'

difficulty: moderate


db: 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'

difficulty: moderate


db: 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

difficulty: simple


db: 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'

difficulty: simple


db: 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'

difficulty: challenging


db: 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

difficulty: challenging


db: superhero

question: Give the publisher ID of Star Trek.

evidence: Star Trek is the publisher_name;

SQL: SELECT id FROM publisher WHERE publisher_name = 'Star Trek'

difficulty: simple


db: 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

difficulty: simple


db: 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

difficulty: simple


db: 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

difficulty: simple


db: 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'

difficulty: simple


db: 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'

difficulty: simple


db: 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

difficulty: moderate


db: superhero

question: Give the name of the alien superheroes.

evidence: alien superheroes refers to race = 'Alien'; name of superhero refers to superhero_name;

SQL: SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Alien'

difficulty: simple


db: 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_cm BETWEEN 170 AND 190; no eye color refers to colour = 'No Colour'

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'

difficulty: moderate


db: superhero

question: What is the superpower of hero ID 56?

evidence: superpower refers to hero_power

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

difficulty: simple


db: 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'

difficulty: simple


db: 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'

difficulty: simple


db: superhero

question: Identify the race of the superhero who weighed 169 kg.

evidence: weighed 169 kg refers to weight_kg = 169

SQL: SELECT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.weight_kg = 169

difficulty: simple


db: 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'

difficulty: moderate


db: 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

difficulty: simple


db: superhero

question: In superheroes with height between 150 to 180, what is the percentage of heroes published by Marvel Comics?

evidence: height between 150 to 180 refers to height_cm BETWEEN 150 AND 180; heroes published by Marvel Comics refers to publisher_name = 'Marvel Comics'; calculation = MULTIPLY(DIVIDE(SUM(publisher.id = 13)), COUNT(publisher.id), 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

difficulty: challenging


db: 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

difficulty: moderate


db: 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

difficulty: simple


db: superhero

question: Indicate the attribute value of superhero Abomination.

evidence: Abomination refers to superhero_name = 'Abomination';

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 = 'Abomination'

difficulty: simple


db: superhero

question: What are the superpowers of heroes with ID 1?

evidence: superpowers refers to power_name; heroes with ID 1 refers to hero_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

difficulty: simple


db: superhero

question: How many heroes have stealth power?

evidence: stealth power refers to power_name = 'stealth';

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'

difficulty: simple


db: 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

difficulty: moderate


db: superhero

question: What is the average of superheroes with no skin colour?

evidence: average = DIVIDE(COUNT(superhero.id), SUM(skin_colour_id = 1)); no skin colour refers to skin_colour_id WHERE colour.id = 1;

SQL: SELECT CAST(COUNT(*) AS REAL) / SUM(CASE WHEN T2.id = 1 THEN 1 ELSE 0 END) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.skin_colour_id = T2.id

difficulty: simple


db: superhero

question: How many superheroes were published by Dark Horse Comics?

evidence: published by Dark Horse Comics refers to publisher_name = 'Dark Horse Comics';

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'

difficulty: simple


db: superhero

question: Which superhero has the most durability published by Dark Horse Comics?

evidence: which superhero refers to superhero_name; 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 LIMIT 1

difficulty: challenging


db: 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'

difficulty: simple


db: 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'

difficulty: simple


db: 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'

difficulty: challenging


db: 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

difficulty: challenging


db: 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'

difficulty: simple


db: superhero

question: What is the percentage of blue female superheroes among all female superheroes?

evidence: percentage = MULTIPLY(DIVIDE(SUM(colour = 'Blue' WHERE gender = 'Female'), COUNT(gender = 'Female')), 100); blue refers to the color = 'Blue' WHERE skin_colour_id = colour.id; female refers to gender = 'Female';

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'

difficulty: challenging


db: 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'

difficulty: simple


db: 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'

difficulty: simple


db: 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'

difficulty: simple


db: 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'

difficulty: simple


db: 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'

difficulty: simple


db: superhero

question: Provide the heights of the heroes whose eye colours are amber.

evidence: heights of the heroes refers to height_cm; eye colours are amber refers to colour.colour = 'Amber' WHERE eye_colour_id = colour.id;

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'

difficulty: simple


db: 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 refers to eye_colour_id AND hair_colour_id WHERE colour.colour = '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'

difficulty: moderate


db: 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'

difficulty: simple


db: 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'

difficulty: simple


db: 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'

difficulty: simple


db: 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 )

difficulty: moderate


db: 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'

difficulty: simple


db: 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'

difficulty: challenging


db: 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'

difficulty: simple


db: superhero

question: Calculate the difference between Emil Blonsky's weight and Charles Chandler's weight.

evidence: difference = SUBTRACT(SUM(weight_kg WHERE full_name = 'Emil Blonsky'), SUM(weight_kg WHERE full_name = 'Charles Chandler')); Emil Blonsky is the full name of superhero; Charles Chandler is the full name of superhero;

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

difficulty: moderate


db: 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

difficulty: simple


db: 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'

difficulty: simple


db: 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

difficulty: simple


db: superhero

question: Which hero was the fastest?

evidence: which hero refers to superhero_name; fastest refers to MAX(attribute_value) WHERE attribute_name = 'Speed';

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 LIMIT 1

difficulty: moderate


db: 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'

difficulty: simple


db: 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'

difficulty: moderate


db: superhero

question: Which superheroes have blue eyes with brown hair?

evidence: which superheroes refers to superhero_name; blue eyes refers to color = 'Blue' and color.id = eye_colour_id; brown hair refers to color = 'Brown' and color.id = hair_colour_id;

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'

difficulty: moderate


db: 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')

difficulty: moderate


db: 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

difficulty: simple


db: 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); blue eyes refers to color = 'Blue' and color.id =  eye_colour_id = 7;

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

difficulty: moderate


db: 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 = 'Female'; female superheroes refers to gender = 'Male';

SQL: 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

difficulty: moderate


db: 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

difficulty: simple


db: 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'

difficulty: simple


db: 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

difficulty: simple


db: 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)

difficulty: simple


db: 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; Karen Beecher-Duncan 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 = 'Karen Beecher-Duncan'

difficulty: simple


db: 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'

difficulty: simple


db: superhero

question: Find the race of the superhero who weighs 108kg and is 188cm tall.

evidence: weighs 108kg refers to weight_kg = 108; 188cm tall refers to height_cm = 188;

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

difficulty: simple


db: superhero

question: What is the publisher name of the superhero ID 38?

evidence: superhero ID 38 refers to 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

difficulty: simple


db: superhero

question: What is the race of the superhero with maximum attribute value?

evidence: maximum attribute value refers to MAX(attribute_value);

SQL: 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

difficulty: simple


db: 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'

difficulty: simple


db: 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

difficulty: simple


db: superhero

question: Calculate the average attribute value of all neutral superheroes.

evidence: average = AVG(attribute_value); 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'

difficulty: simple


db: superhero

question: List the skin colour of the superheroes with 100 attribute value.

evidence: skin colour refers to colour.colour where skin_colour_id = colour.id; 100 attribute value refers to attribute_value = 100;

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

difficulty: moderate


db: 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'

difficulty: simple


db: 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

difficulty: simple


db: superhero

question: Give the race of the blue-haired male superhero.

evidence: blue-haired refers to colour.colour = 'blue' WHERE hair_colour_id = colour.id; male refers to gender = 'male';

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'

difficulty: moderate


db: 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'

difficulty: challenging


db: 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

difficulty: challenging


db: 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'

difficulty: moderate


db: superhero

question: List down Ajax's superpowers.

evidence: Ajax refers to superhero_name = 'Ajax'; 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 T2.power_id = T3.id WHERE T1.superhero_name = 'Ajax'

difficulty: simple


db: 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'

difficulty: moderate


db: 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'

difficulty: moderate


db: 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

difficulty: moderate


db: superhero

question: Identify the gender of the superhero who has the ability of Phoenix Force.

evidence: ability of Phoenix Force refers to power_name = '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'

difficulty: moderate


db: 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

difficulty: simple


db: 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'

difficulty: moderate


db: 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

difficulty: simple


db: 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

difficulty: challenging


db: 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

difficulty: moderate


db: 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'

difficulty: simple


db: superhero

question: Name the tallest superhero.

evidence: tallest superhero refers to MAX(height_cm);

SQL: SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1

difficulty: simple


db: 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'

difficulty: simple


db: 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 = MULTIPLY(DIVIDE(SUM(gender = 'Female' WHERE publisher_name = 'George Lucas'), COUNT(publisher_name = 'George Lucas')), 100.0); 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'

difficulty: challenging


db: 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 INNER JOIN alignment AS T3 ON T1.alignment_id = T3.id WHERE T2.publisher_name = 'Marvel Comics'

difficulty: challenging


db: 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%'

difficulty: simple


db: 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 )

difficulty: simple


db: superhero

question: Provide the full name of the superhero named Alien.

SQL: SELECT full_name FROM superhero WHERE superhero_name = 'Alien'

difficulty: simple


db: 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'

difficulty: simple


db: 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'

difficulty: simple


db: 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

difficulty: simple


db: 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'

difficulty: simple


db: superhero

question: List the hero ID of superheroes have intellegence as their power.

evidence: hero ID refers to superhero.id; have intelligence as their power refers to power_name = 'Intelligence';

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'

difficulty: simple


db: 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'

difficulty: simple


db: 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

difficulty: moderate