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