This commit is contained in:
Paul Trowbridge 2024-08-29 14:06:05 -04:00
parent 44fcdf2ca5
commit 60d30b8c92

View File

@ -68,12 +68,16 @@ SELECT
,s.pdate
,s.descr
,s.amount
,s.category
--,s.category
,s.party
,s.reason
,s.balance
--,s.balance
,CASE WHEN s.srce = 'hunt' THEN s.balance ELSE null END hunt
,CASE WHEN s.srce = 'dcard' THEN s.balance ELSE null END dcard
,CASE WHEN s.srce = 'chase' THEN s.balance ELSE null END chase
,sum(s.amount) over (ORDER BY s.pdate asc, s.id) + 28452.02 netbalance
FROM
stacked s
ORDER BY
s.pdate desc
,s.id desc