question_id
stringlengths
1
4
db_id
stringclasses
11 values
question
stringlengths
23
286
evidence
stringlengths
0
591
sql
stringlengths
29
1.45k
difficulty
stringclasses
3 values
700
codebase_community
Identify the number of posts that offer a bounty amount over 30.
bounty amount over 30 refers to BountyAmount > = 30;
SELECT COUNT(id) FROM votes WHERE BountyAmount >= 30
simple
701
codebase_community
Among all the posts posted by the most influential user, identify the percentage with a score above 50.
The higher reputation the user has the more influence; percentage = DIVIDE(COUNT(stats_posts.Id where Score > 50 and MAX(Reputation))), COUNT(stats_posts.Id where MAX(Reputation));
SELECT CAST(SUM(CASE WHEN T2.Score > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Id) FROM users T1 INNER JOIN posts T2 ON T1.Id = T2.OwnerUserId INNER JOIN ( SELECT MAX(Reputation) AS max_reputation FROM users ) T3 ON T1.Reputation = T3.max_reputation
challenging
702
codebase_community
How many posts have a score less than 20?
score less than 20 refers to Score < 20;
SELECT COUNT(id) FROM posts WHERE Score < 20
simple
703
codebase_community
Among the tags with tag ID below 15, how many of them have 20 count of posts and below?
ID below 15 refers to Id < 15; have 20 count of posts and below refers to Count < = 20;
SELECT COUNT(id) FROM tags WHERE Count <= 20 AND Id < 15
simple
704
codebase_community
What is the excerpt post ID and wiki post ID of the tag named sample?
tag named sample refers to TagName = 'sample';
SELECT ExcerptPostId, WikiPostId FROM tags WHERE TagName = 'sample'
simple
705
codebase_community
Give the user's reputation and up vote number of the user that commented "fine, you win :)".
Text = 'fine, you win :)';
SELECT T2.Reputation, T2.UpVotes FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Text = 'fine, you win :)'
simple
706
codebase_community
Give the texts commented on the post about linear regression.
about linear regression refers to Title contains 'linear regression'
SELECT T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.Title LIKE '%linear regression%'
simple
707
codebase_community
Among the posts with views ranging from 100 to 150, what is the comment with the highest score?
views ranging from 100 to 150 refers to ViewCount BETWEEN 100 and 150; comment with the highest score refers to Text where MAX(Score);
SELECT Text FROM comments WHERE PostId IN ( SELECT Id FROM posts WHERE ViewCount BETWEEN 100 AND 150 ) ORDER BY Score DESC LIMIT 1
moderate
708
codebase_community
List the creation date and age of the user that commented with webiste.
commented with webiste refers to the value contains 'http://'
SELECT T2.CreationDate, T2.Age FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.text LIKE '%http://%'
moderate
709
codebase_community
In comments with 0 score, how many of the posts have view count lower than 5?
view count lower than 5 refers to ViewCount < 5;
SELECT COUNT(T1.Id) FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.ViewCount < 5 AND T2.Score = 0
simple
710
codebase_community
In posts with 1 comment, how many of the comments have 0 score?
in posts with 1 comment refers to CommentCount = 1;
SELECT COUNT(T1.id) FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.CommentCount = 1 AND T2.Score = 0
simple
711
codebase_community
Among products comments with 0 score, what is the total number of users ages 40 years old?
SELECT COUNT(DISTINCT T1.id) FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Score = 0 AND T2.Age = 40
simple
712
codebase_community
What is the post ID and the comments commented in the post titled by "Group differences on a five point Likert item"?
Title = 'Group differences on a five point Likert item';
SELECT T2.Id, T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.Title = 'Group differences on a five point Likert item'
simple
713
codebase_community
What is the up vote number of the user that commented "R is also lazy evaluated."?
commented "R is also lazy evaluated." refers to Text of the comment;
SELECT T2.UpVotes FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Text = 'R is also lazy evaluated.'
simple
714
codebase_community
List the comments commented by the user with a username of Harvey Motulsky.
comments refer to Text; username of Harvey Motulsky refers to DisplayName = 'Harvey Motulsky';
SELECT T1.Text FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'Harvey Motulsky'
simple
715
codebase_community
In comments with score between 1 to 5, list down the display names of the users with 0 down votes.
DownVotes = 0; Score BETWEEN 1 and 5
SELECT T2.DisplayName FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Score BETWEEN 1 AND 5 AND T2.DownVotes = 0
simple
716
codebase_community
Among the comments with scores between 5 to 10, what is the percentage of the users with 0 up votes?
percentage = DIVIDE(COUNT(UserId where UpVotes = 0 and Score BETWEEN 5 and 10))*100, (COUNT(UserId where Score BETWEEN 5 and 10));
SELECT CAST(SUM(IIF(T1.UpVotes = 0, 1, 0)) AS REAL) * 100/ COUNT(T1.Id) AS per FROM users AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.UserId WHERE T2.Score BETWEEN 5 AND 10
moderate
717
superhero
Please list all the superpowers of 3-D Man.
3-D Man refers to superhero_name = '3-D Man'; superpowers refers to power_name
SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.superhero_name = '3-D Man'
simple
718
superhero
How many superheroes have the super power of "Super Strength"?
super power of "Super Strength" refers to power_name = 'Super Strength'
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'
simple
719
superhero
Among the superheroes with the super power of "Super Strength", how many of them have a height of over 200cm?
super power of "Super Strength" refers to power_name = 'Super Strength'; a height of over 200cm refers to height_cm > 200
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
moderate
720
superhero
Please list the full names of all the superheroes with over 15 super powers.
15 super powers refers to COUNT(full_name) > 15
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
simple
721
superhero
How many superheroes have blue eyes?
blue eyes refers to colour = 'Blue' and eye_colour_id = colour.id;
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T2.colour = 'Blue'
simple
722
superhero
What is the colour of Apocalypse's skin?
Apocalypse refers to superhero_name = 'Apocalypse'; colour of skin refers to colour where skin_colour_id = colour.id
SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.skin_colour_id = T2.id WHERE T1.superhero_name = 'Apocalypse'
simple
723
superhero
Among the superheroes with blue eyes, how many of them have the super power of "Agility"?
blue eyes refers to colour = 'Blue' and eye_colour_id = colour.id; super power of "Agility" refers to power_name = 'Agility'
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'
moderate
724
superhero
Please list the superhero names of all the superheroes that have blue eyes and blond hair.
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'
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'
challenging
725
superhero
How many superheroes are published by Marvel Comics?
published by Marvel Comics refers to publisher_name = 'Marvel Comics'
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Marvel Comics'
simple
726
superhero
Rank heroes published by Marvel Comics by their height in descending order.
name refers to superhero_name; the tallest hero refers to MAX(height_cm); published by Marvel Comics refers to publisher_name = 'Marvel Comics'
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'
moderate
727
superhero
Who is the publisher of Sauron?
the publisher refers to publisher_name; Sauron refers to superhero_name = 'Sauron'
SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.superhero_name = 'Sauron'
simple
728
superhero
Rank superheroes from Marvel Comics by their eye color popularity, starting with the most common color.
the superheroes from Marvel Comics refers to publisher_name = 'Marvel Comics'; most common color refers to COUNT(superhero.id) DESC;
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
moderate
729
superhero
What is the average height of the superheroes from Marvel Comics?
superheroes from Marvel Comics refers to publisher_name = 'Marvel Comics'; average height of the superheroes refers to AVG(height_cm)
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'
simple
730
superhero
List the superheroes from Marvel Comics who have the super power of 'Super Strength'.
the superheroes from Marvel Comics refers to publisher_name = 'Marvel Comics'; super power of "Super Strength" refers to power_name = 'Super Strength';
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)
challenging
731
superhero
How many superheroes did DC Comics publish?
superheroes that DC Comics published refers to publisher_name = 'DC Comics'
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'
simple
732
superhero
Which publisher published the slowest superhero?
the slowest superhero refers to attribute_name = 'Speed' where MIN(attribute_value); publisher refers to publisher_name
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
moderate
733
superhero
How many gold-eyed superheroes did Marvel Comics publish?
gold-eyed refers to colour = 'Gold' where eye_colour_id = colour.id; superheroes that Marvel Comics published refers to publisher_name = 'Marvel Comics'
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN colour AS T3 ON T1.eye_colour_id = T3.id WHERE T2.publisher_name = 'Marvel Comics' AND T3.colour = 'Gold'
moderate
734
superhero
What is the publisher's name of Blue Beetle II?
Blue Beetle II refers to superhero_name = 'Blue Beetle II'
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'
simple
735
superhero
How many superheroes with blonde hair are there?
superheroes with blonde hair refers to colour = 'Blond' where hair_colour_id = colour.id
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.hair_colour_id = T2.id WHERE T2.colour = 'Blond'
simple
736
superhero
Who is the dumbest superhero?
the dumbest superhero refers to MIN(attribute_value) where attribute_name = 'Intelligence'
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
moderate
737
superhero
What is Copycat's race?
Copycat is the superhero_name;
SELECT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.superhero_name = 'Copycat'
simple
738
superhero
Which superheroes have a durability attribute value of less than 50?
durability of less than 50 refers to attribute_name = 'Durability' AND attribute_value < 50
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)
simple
739
superhero
What are the names of the superheroes with the power of death touch?
name of superheroes refers to refers to superhero_name; the power of death touch refers to power_name = 'Death Touch'
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'
moderate
740
superhero
How many female superheroes have a strength value of 100?
female refers to gender = 'Female'; strength value of 100 refers to attribute_name = 'Strength' AND attribute_value = 100
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'
moderate
741
superhero
What is the name of the superhero that has the most powers?
name of the superhero refers to superhero_name; superhero that has the most powers refers to MAX(COUNT(superhero_name))
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
simple
742
superhero
How many vampire superheroes are there?
vampire superheroes refers to race = 'Vampire'
SELECT COUNT(T1.superhero_name) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Vampire'
simple
743
superhero
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.
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)
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'
challenging
744
superhero
Between DC and Marvel Comics, which publisher has published more superheroes? Find the difference in the number of superheroes they have published.
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'))
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
challenging
745
superhero
Give the publisher ID of Star Trek.
Star Trek is the publisher_name;
SELECT id FROM publisher WHERE publisher_name = 'Star Trek'
simple
746
superhero
Calculate the average attribute value of all superheroes.
average attribute value of all superheroes refers to AVG(attribute_value)
SELECT AVG(attribute_value) FROM hero_attribute
simple
747
superhero
What is the total number of superheroes without full name?
superheroes without full name refers to full_name IS NULL
SELECT COUNT(id) FROM superhero WHERE full_name IS NULL
simple
748
superhero
What is the eye colour of superhero with superhero ID 75?
eye colour refers to colour where eye_colour_id = colour.id;
SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.id = 75
simple
749
superhero
Provide the superpowers of the superhero called Deathlok.
superpowers refers to power_name; Deathlok refers to superhero_name = 'Deathlok'
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'
simple
750
superhero
What is the average weight of all female superheroes?
female refers to gender = 'Female'; average weight refers to AVG(weight_kg)
SELECT AVG(T1.weight_kg) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T2.gender = 'Female'
simple
751
superhero
List down at least five superpowers of male superheroes.
male refers to gender = 'Male'; superpowers refers to power_name;
SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T3.id = T2.power_id INNER JOIN gender AS T4 ON T4.id = T1.gender_id WHERE T4.gender = 'Male' LIMIT 5
moderate
752
superhero
Give the name of the alien superheroes.
alien superheroes refers to race = 'Alien'; name of superhero refers to superhero_name;
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Alien'
simple
753
superhero
Among the superheroes with height from 170 to 190, list the names of the superheroes with no eye color.
height from 170 to 190 refers to height_cm BETWEEN 170 AND 190; no eye color refers to colour = 'No Colour'
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'
moderate
754
superhero
What is the superpower of hero ID 56?
superpower refers to hero_power
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
simple
755
superhero
List down at least five full name of Demi-God superheroes.
Demi-God superheroes refers to race = 'Demi-God'
SELECT T1.full_name FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Demi-God'
simple
756
superhero
How many bad superheroes are there?
bad superheroes refers to alignment_id = Bad
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Bad'
simple
757
superhero
Identify the race of the superhero who weighed 169 kg.
weighed 169 kg refers to weight_kg = 169
SELECT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.weight_kg = 169
simple
758
superhero
Provide the hair colour of the human superhero who is 185 cm tall.
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;
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'
moderate
759
superhero
What is the eye clolour of the heaviest superhero?
the heaviest superhero refers to MAX(weight_kg); eye colour refers to colour where eye_colour_id = colour.id;
SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id ORDER BY T1.weight_kg DESC LIMIT 1
simple
760
superhero
In superheroes with height between 150 to 180, what is the percentage of heroes published by Marvel Comics?
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)
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
challenging
761
superhero
Among the male superheroes, list the super hero names of superheroes with weight greater than the 79% average weight of all superheroes.
super hero names refers to superhero_name;male superheros refers to gender = 'Male';Calculation = weight_kg > MULTIPLY(AVG(weight_kg), 0.79)
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
moderate
762
superhero
Which power do superheroes have the most of?
power that superheroes have the most refers to MAX(COUNT(power_name))
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
simple
763
superhero
Indicate the attribute value of superhero Abomination.
Abomination refers to superhero_name = 'Abomination';
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'
simple
764
superhero
What are the superpowers of heroes with ID 1?
superpowers refers to power_name; heroes with ID 1 refers to hero_id = 1;
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
simple
765
superhero
How many heroes have stealth power?
stealth power refers to power_name = 'stealth';
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'
simple
766
superhero
What is the hero's full name with the highest attribute in strength?
highest attribute in strength refers to MAX(attribute_value) WHERE attribute_name = 'strength';
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
moderate
767
superhero
What is the average of superheroes with no skin colour?
average = DIVIDE(COUNT(superhero.id), SUM(skin_colour_id = 1)); no skin colour refers to skin_colour_id WHERE colour.id = 1;
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
simple
768
superhero
How many superheroes were published by Dark Horse Comics?
published by Dark Horse Comics refers to publisher_name = 'Dark Horse Comics';
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'
simple
769
superhero
Which superhero has the most durability published by Dark Horse Comics?
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';
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
challenging
770
superhero
What is the eyes colour of Abraham Sapien?
eye colour refers to colour.colour where eye_colour_id = colour.id; Abraham Sapien is the full name of superhero;
SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.full_name = 'Abraham Sapien'
simple
771
superhero
List the name of superheroes with flight power.
name of superheroes refers to superhero_name; flight power refers to power_name = 'Flight';
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'
simple
772
superhero
List the eyes, hair and skin colour of all female superheroes published by Dark Horse Comics.
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';
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'
challenging
773
superhero
Which superhero has the same eyes, hair and skin colour? Indicate the publisher of the superhero.
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;
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
challenging
774
superhero
Which group does superhero A-Bomb belong to?
group refers to race; A-Bomb refers to superhero_name = 'A-Bomb';
SELECT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.superhero_name = 'A-Bomb'
simple
775
superhero
What is the percentage of blue female superheroes among all female superheroes?
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';
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'
challenging
776
superhero
Provide the hero name and race of Charles Chandler.
hero name refers to superhero_name; Charles Chandler is the full name of superhero;
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'
simple
777
superhero
What is the gender of Agent 13 hero?
Agent 13 hero refers to superhero_name = 'Agent 13';
SELECT T2.gender FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T1.superhero_name = 'Agent 13'
simple
778
superhero
Provide superheroes' names who have the adaptation power.
adaptation power refers to power_name = 'Adaptation';
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'
simple
779
superhero
How many powers does Amazo hero have?
Amazo hero refers to superhero_name = 'Amazo';
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'
simple
780
superhero
List the powers of Hunter Zolomon.
Hunter Zolomon is the full name of superhero; list the powers refers to power_name;
SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.full_name = 'Hunter Zolomon'
simple
781
superhero
Provide the heights of the heroes whose eye colours are amber.
heights of the heroes refers to height_cm; eye colours are amber refers to colour.colour = 'Amber' WHERE eye_colour_id = colour.id;
SELECT T1.height_cm FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T2.colour = 'Amber'
simple
782
superhero
List the heroes' names whose eyes and hair colours are both black.
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';
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'
moderate
783
superhero
Provide the eye colours of the heroes whose skin colours are gold.
skin colours are gold refers to colour.colour = 'Gold' WHERE skin_colour_id = colour.id;
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'
simple
784
superhero
Provide the full names of vampire heroes.
vampire heroes refers to race = 'Vampire';
SELECT T1.full_name FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Vampire'
simple
785
superhero
Describe the names of neutral alignment superheroes.
names of superheroes refers to superhero_name; neutral alignment refers to alignment = 'Neutral';
SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'
simple
786
superhero
How many heroes have the highest attribute value in strength?
highest attribute value in strength refers to MAX(attribute_value) WHERE attribute_name = 'Strength';
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 )
moderate
787
superhero
What are the race and alignment of Cameron Hicks?
Cameron Hicks refers to superhero_name = 'Cameron Hicks';
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'
simple
788
superhero
How many percent of female heroes were published by Marvel Comics?
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';
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'
challenging
789
superhero
Find the average weight of the heroes who are aliens.
average = AVG(weight_kg); aliens refers to race = 'Alien';
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'
simple
790
superhero
Calculate the difference between Emil Blonsky's weight and Charles Chandler's weight.
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;
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
moderate
791
superhero
Calculate the average height for each superhero.
average = DIVIDE(SUM(height_cm), COUNT(all heros));
SELECT CAST(SUM(height_cm) AS REAL) / COUNT(id) FROM superhero
simple
792
superhero
What is Abomination's superpower?
Abomination refers to superhero_name = 'Abomination'; superpower refers to power_name;
SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.superhero_name = 'Abomination'
simple
793
superhero
Among the superheroes with the race of god/eternal, how many of them are male
race "god/eternal" refers to race_id = 21; male refers to gender.id = 1
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
simple
794
superhero
Which hero was the fastest?
which hero refers to superhero_name; fastest refers to MAX(attribute_value) WHERE attribute_name = 'Speed';
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
moderate
795
superhero
How many superheroes have a neutral alignment?
neutral alignment refers to alignment_id = 3;
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'
simple
796
superhero
State all of 3-D Man's attributes along with their values.
3-D Man is the superhero_name. attributes refers to attribute_name; values refers to attribute_value;
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'
moderate
797
superhero
Which superheroes have blue eyes with brown hair?
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;
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'
moderate
798
superhero
What is the publisher for Hawkman, Karate Kid and Speedy?
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';
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')
moderate
799
superhero
How many superheroes didn't have any publisher?
didn't have any publisher refers to publisher.id = 1;
SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.id = 1
simple