From 503b5f355118a914288dcadf52df1bcd5b250c51 Mon Sep 17 00:00:00 2001 From: gered Date: Sat, 16 Jun 2018 11:17:48 -0400 Subject: [PATCH] fix most-valuable-cards list from showing duplicates the duplicates would arise when multiple owned copies differed by card quality. --- src/mtgcoll/views/functions/statistics.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mtgcoll/views/functions/statistics.clj b/src/mtgcoll/views/functions/statistics.clj index 0bd3059..ffadda5 100644 --- a/src/mtgcoll/views/functions/statistics.clj +++ b/src/mtgcoll/views/functions/statistics.clj @@ -406,7 +406,7 @@ (let [online? (boolean online?) list-id (int list-id) public-only? (nil? user-id)] - ["select c.id, c.name, c.set_code, cp.price + ["select distinct c.id, c.name, c.set_code, cp.price from cards c join card_prices cp on c.id = cp.card_id join collection cl on c.id = cl.card_id