Hacker News new | ask | show | jobs
by unzadunza 1076 days ago

  select genre, sum(plays) from plays group by genre order by sum(plays) desc limit 40;
  ┌─────────────────────┬────────────┐
  │        genre        │ sum(plays) │
  │       varchar       │   int128   │
  ├─────────────────────┼────────────┤
  │ Jazz                │       5754 │
  │ Rock                │       5149 │
  │ Alternative         │       1511 │
  │ Hip Hop/Rap         │        986 │
  │ Pop                 │        811 │
  │ Alternative & Punk  │        725 │
  │ Electronic          │        713 │
  │ Reggae              │        670 │
  │ Country             │        612 │
  │ Holiday             │        581 │
  │ Folk                │        553 │
  │ Classical           │        433 │
  │ R&B                 │        359 │
  │ World               │        334 │
  │                     │        303 │
  │ Electronica/Dance   │        302 │
  │ Singer/Songwriter   │        275 │
  │ R&B/Soul            │        242 │
  │ Metal               │        119 │
  │ Psychedelic         │        111 │
  │ Blues               │        110 │
  │ Contemporary Folk   │         74 │
  │ Indie Rock          │         65 │
  │ Fusion              │         58 │
  │ Soundtrack          │         47 │
  │ Indie Pop           │         40 │
  │ Easy Listening      │         34 │
  │ Dance               │         20 │
  │ Alternative Folk    │         20 │
  │ Punk                │         20 │
  │ rock                │         20 │
  │ Downtempo           │         18 │
  │ Electronica         │         18 │
  │ Contemporary Jazz   │         13 │
  │ Hip-Hop/Rap         │         10 │
  │ Indian Classical    │          9 │
  │ Traditional Country │          7 │
  │ New Age             │          7 │
  │ Alternative Country │          6 │
  │ Opera               │          5 │
  ├─────────────────────┴────────────┤
  │ 40 rows                2 columns │
  └──────────────────────────────────┘
I don't know if I trust Apple Music's accounting, but I'm a jazz fan too.
1 comments

Neat. I note both of these queries could be done via my UI easily, but sharing the results would be impossible without sharing your entire history too.