commit ac8a2d9b45229a1f14eaac84d3634aa8eef96ac4 Author: bot50 Date: Wed Mar 27 11:02:50 2024 +0000 kukemuna-cs50/problems/2024/x/songs@20240327T110250.768791505Z diff --git a/1.sql b/1.sql new file mode 100644 index 0000000..c1e8cdc --- /dev/null +++ b/1.sql @@ -0,0 +1,2 @@ +SELECT name +FROM songs; diff --git a/2.sql b/2.sql new file mode 100644 index 0000000..dc30a69 --- /dev/null +++ b/2.sql @@ -0,0 +1,3 @@ +SELECT name +FROM songs +ORDER BY tempo; diff --git a/3.sql b/3.sql new file mode 100644 index 0000000..43a909c --- /dev/null +++ b/3.sql @@ -0,0 +1,4 @@ +SELECT name +FROM songs +ORDER BY duration_ms DESC +LIMIT 5; diff --git a/4.sql b/4.sql new file mode 100644 index 0000000..8d22b97 --- /dev/null +++ b/4.sql @@ -0,0 +1,3 @@ +SELECT name +FROM songs +WHERE danceability > 0.75 AND energy > 0.75 AND valence > 0.75; diff --git a/5.sql b/5.sql new file mode 100644 index 0000000..27e7560 --- /dev/null +++ b/5.sql @@ -0,0 +1,2 @@ +SELECT AVG(energy) +FROM songs; diff --git a/6.sql b/6.sql new file mode 100644 index 0000000..9ebc7df --- /dev/null +++ b/6.sql @@ -0,0 +1,8 @@ +SELECT name +FROM songs +WHERE artist_id = +( + SELECT id + FROM artists + WHERE name = 'Post Malone' +); diff --git a/7.sql b/7.sql new file mode 100644 index 0000000..620d413 --- /dev/null +++ b/7.sql @@ -0,0 +1,4 @@ +SELECT AVG(energy) +FROM songs +JOIN artists ON songs.artist_id = artists.id +WHERE artists.name = 'Drake'; diff --git a/8.sql b/8.sql new file mode 100644 index 0000000..973f84d --- /dev/null +++ b/8.sql @@ -0,0 +1,3 @@ +SELECT name +FROM songs +WHERE name LIKE '%feat.%'; diff --git a/answers.txt b/answers.txt new file mode 100644 index 0000000..cf19a4f --- /dev/null +++ b/answers.txt @@ -0,0 +1,5 @@ +¤ As per "https://newsroom.spotify.com/2021-12-01/learn-more-about-the-audio-aura-in-your-spotify-2021-wrapped-with-aura-reader-mystic-michaela/", givern person's "aura" seems to be either "orage" +or "purple" based on above average (middle of the scale) energy and danceability together with high tempo. + +¤ With a list of predefined "auras" with their description and drawn graphs of parameters from songs.db one can approximate a possible "aura". But this problem is way too abstract (for me) to +comprehend, thus I cannot propose any alorithm to calculate said "aura".