Skip to content

Commit

Permalink
fix: query
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Jan 27, 2025
1 parent 54e0b70 commit 850ca21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/datastore/pg-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2502,7 +2502,7 @@ export class PgStore extends BasePgStore {
COALESCE((SELECT total FROM received), 0) AS inbound,
COALESCE((SELECT total FROM sent), 0) + COALESCE((SELECT total FROM sponsored), 0) AS outbound
)
SELECT inbound, outbound, (inbound - outbound) AS delta
SELECT inbound, outbound, (inbound - outbound) AS delta FROM values
`;
return {
inbound: BigInt(results[0]?.inbound ?? '0'),
Expand Down

0 comments on commit 850ca21

Please sign in to comment.