Skip to content

Commit 645e506

Browse files
committed
Fix volume summation
1 parent 4d2b599 commit 645e506

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/frontend/src/sql/bookkeeper-sql.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ export const SatsFlowSQL = (startTimestamp: number, endTimestamp: number): strin
2929
"SELECT in_channel, " +
3030
"(SELECT peer_id FROM peerchannels WHERE peerchannels.short_channel_id=in_channel) AS in_channel_peerid, " +
3131
"(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, " +
32-
"in_msat, " +
32+
"SUM(in_msat), " +
3333
"out_channel, " +
3434
"(SELECT peer_id FROM peerchannels WHERE peerchannels.short_channel_id=out_channel) AS out_channel_peerid, " +
3535
"(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, " +
36-
"out_msat, " +
37-
"fee_msat " +
36+
"SUM(out_msat), " +
37+
"SUM(fee_msat) " +
3838
"FROM forwards " +
3939
"WHERE forwards.status='settled' " +
4040
"GROUP BY in_channel, out_channel;";

0 commit comments

Comments
 (0)