diff --git a/lib/music_library/collection.ex b/lib/music_library/collection.ex index 50073284..76481853 100644 --- a/lib/music_library/collection.ex +++ b/lib/music_library/collection.ex @@ -109,6 +109,8 @@ defmodule MusicLibrary.Collection do q = from r in fragment("records, json_each(records.genres)"), where: fragment("records.purchased_at IS NOT NULL"), + # we remove rock as it's really generic and dwarfs other genres + where: fragment("? != 'rock'", r.value), group_by: r.value, order_by: [desc: fragment("count(1)")], select: {r.value, fragment("count(1)")},