Created
September 6, 2021 13:22
-
-
Save moqdm/6d19f02b52c425ef38451afa64f660f4 to your computer and use it in GitHub Desktop.
it's my Lab 7: Songs solution... *Please just take a look if you couldn't solve it ... Thank you π #cs50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 1.sql | |
SELECT name FROM songs; | |
-- 2.sql | |
SELECT name FROM songs ORDER BY tempo; | |
-- 3.sql | |
SELECT name FROM songs ORDER BY duration_ms DESC LIMIT 5; | |
-- 4.sql | |
SELECT name FROM songs WHERE danceability > 0.75 AND energy > 0.75 AND valence > 0.75; | |
-- 5.sql | |
SELECT avg(energy) FROM songs; | |
-- 6.sql | |
SELECT name FROM songs WHERE artist_id = (SELECT id FROM artists WHERE name == "Post Malone"); | |
-- 7.sql | |
SELECT avg(energy) FROM songs WHERE artist_id = (SELECT id FROM artists WHERE name == "Drake"); | |
-- 8.sql | |
SELECT name FROM songs WHERE name LIKE "%feat.%"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
someone can help me solving this problem set? please +52 5518382237