Skip to content

Commit

Permalink
Fix volume summation
Browse files Browse the repository at this point in the history
  • Loading branch information
evansmj committed Dec 26, 2024
1 parent 4d2b599 commit 645e506
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/frontend/src/sql/bookkeeper-sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ export const SatsFlowSQL = (startTimestamp: number, endTimestamp: number): strin
"SELECT in_channel, " +
"(SELECT peer_id FROM peerchannels WHERE peerchannels.short_channel_id=in_channel) AS in_channel_peerid, " +
"(SELECT nodes.alias FROM nodes WHERE nodes.nodeid=(SELECT peer_id FROM peerchannels WHERE peerchannels.short_channel_id=in_channel)) AS in_channel_peer_alias, " +
"in_msat, " +
"SUM(in_msat), " +
"out_channel, " +
"(SELECT peer_id FROM peerchannels WHERE peerchannels.short_channel_id=out_channel) AS out_channel_peerid, " +
"(SELECT nodes.alias FROM nodes WHERE nodes.nodeid=(SELECT peer_id FROM peerchannels WHERE peerchannels.short_channel_id=out_channel)) AS out_channel_peer_alias, " +
"out_msat, " +
"fee_msat " +
"SUM(out_msat), " +
"SUM(fee_msat) " +
"FROM forwards " +
"WHERE forwards.status='settled' " +
"GROUP BY in_channel, out_channel;";

0 comments on commit 645e506

Please sign in to comment.