Graphs and tables for your Spotify account.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
330 B

  1. -- select t.name as track, a.name as artist
  2. select substring(t.name for 50) as track, a.name as artist, count(t.id)
  3. from api_history as h
  4. join api_track as t
  5. on h.track_id = t.id
  6. join api_track_artists ta
  7. on ta.track_id = t.id
  8. join api_artist a
  9. on a.id = ta.artist_id
  10. group by t.id, a.id
  11. order by count(t.id) desc;
  12. -- limit 10;