Database containing superhero information including powers, attributes, and publishers.
| Column Name | Description |
|---|---|
id |
- |
superhero_name |
- |
full_name |
- |
gender_id |
- |
eye_colour_id |
- |
hair_colour_id |
- |
skin_colour_id |
- |
race_id |
- |
publisher_id |
- |
alignment_id |
- |
height_cm |
- |
weight_kg |
- |
| Column Name | Description |
|---|---|
id |
- |
gender |
- |
| Column Name | Description |
|---|---|
id |
- |
colour |
- |
| Column Name | Description |
|---|---|
id |
- |
race |
- |
| Column Name | Description |
|---|---|
id |
- |
publisher_name |
- |
| Column Name | Description |
|---|---|
id |
- |
alignment |
- |
| Column Name | Description |
|---|---|
id |
- |
power_name |
- |
| Column Name | Description |
|---|---|
id |
- |
attribute_name |
- |
| Column Name | Description |
|---|---|
hero_id |
- |
power_id |
- |
| Column Name | Description |
|---|---|
hero_id |
- |
attribute_id |
- |
attribute_value |
- |
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'
blue-haired refers to colour.colour = 'blue' WHERE hair_colour_id = colour.id; male refers to gender = 'male';
SELECT AVG(attribute_value) FROM hero_attribute
average attribute value of all superheroes refers to AVG(attribute_value)
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
power of superheroes refers to power_name; height greater than 80% of the average height of all superheroes = height_cm > MULTIPLY(AVG(height_cm), 0.8);
SELECT 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'
average = AVG(weight_kg); aliens refers to race = 'Alien';
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'
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';