Last active
April 28, 2021 07:13
-
-
Save antaldaniel/d26ec95e2156fb41f80d8e5f0fdc102b to your computer and use it in GitHub Desktop.
SMDB demo queries
This file contains 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
/* | |
How much more dancable are The Youniverse than the average Slovak music? | |
<run separately after the / sign> | |
*/ | |
select( | |
(select avg(danceability) as [The Youniverse - Danceability] from "spotify-top-tracks" where spotify_artist_name = "The Youniverse" ) / | |
(select avg(danceability) as [Average Danceability] from "spotify-top-tracks") - 1 | |
)*100 as percent | |
/* | |
What is Katarzia's favorite key? | |
<run separately after the / sign> | |
*/ | |
select key as [Katarzia's most frequent key], count(key) Frequency | |
from "spotify-top-tracks" where spotify_artist_name = "Katarzia" | |
group by key order by count(key) desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment