From d9391a803e6a2ab87e418ec879d9166f8f3dbb8e Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sun, 31 Aug 2025 09:51:02 +0300 Subject: [PATCH] Remove 'rock' from genre count --- lib/music_library/collection.ex | 2 ++ 1 file changed, 2 insertions(+) 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)")},