Download code/example_queries.sql from alpha31476/spotify-metadata-parquet: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/datasets/alpha31476/spotify-metadata-parquet/resolve/main/code/example_queries.sql
- Command line
-
hf download hf://datasets/alpha31476/spotify-metadata-parquet/code/example_queries.sql
-
curl -L -o example_queries.sql https://huggingface.co/datasets/alpha31476/spotify-metadata-parquet/resolve/main/code/example_queries.sql
1.01 kB
| -- Run one statement at a time with query_spotify.py --sql "...". | |
| SELECT rowid, id, name, popularity, duration_ms | |
| FROM tracks | |
| LIMIT 20; | |
| SELECT track_id, tempo, energy, danceability, acousticness, valence | |
| FROM track_audio_features | |
| WHERE null_response = 0 | |
| LIMIT 20; | |
| SELECT t.id, t.name AS track_name, t.popularity, | |
| a.name AS album_name, a.release_date | |
| FROM tracks AS t | |
| LEFT JOIN albums AS a ON a.rowid = t.album_rowid | |
| LIMIT 20; | |
| SELECT t.id, t.name AS track_name, a.name AS artist_name, | |
| a.popularity AS artist_popularity, g.genre | |
| FROM tracks AS t | |
| JOIN track_artists AS ta ON ta.track_rowid = t.rowid | |
| JOIN artists AS a ON a.rowid = ta.artist_rowid | |
| LEFT JOIN artist_genres AS g ON g.artist_rowid = a.rowid | |
| LIMIT 20; | |
| -- Genres belong to artists. A track can have several artists and genres. | |
| -- Feature IDs join to tracks.id, not to the SQLite rowid. | |
| SELECT t.id, t.name, t.popularity, f.tempo, f.energy, f.danceability | |
| FROM tracks AS t | |
| JOIN track_audio_features AS f ON f.track_id = t.id | |
| LIMIT 20; | |