From 7d4324eb33fcc9b332a3911431ddbbb37e548dc0 Mon Sep 17 00:00:00 2001 From: keyan Date: Wed, 19 Jan 2022 10:36:00 -0600 Subject: [PATCH] exclude users spent sats from their stacked count --- api/resolvers/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/resolvers/user.js b/api/resolvers/user.js index 6051d086..11cb90cd 100644 --- a/api/resolvers/user.js +++ b/api/resolvers/user.js @@ -48,7 +48,7 @@ export default { FROM "ItemAct" JOIN "Item" on "ItemAct"."itemId" = "Item".id JOIN users on "Item"."userId" = users.id - WHERE act <> 'BOOST' AND "ItemAct".created_at <= $1 + WHERE act <> 'BOOST' AND "ItemAct"."userId" <> users.id AND "ItemAct".created_at <= $1 ${topClause(within)} GROUP BY users.id, users.name ORDER BY stacked DESC NULLS LAST, users.created_at DESC