balances
This commit is contained in:
parent
44fcdf2ca5
commit
60d30b8c92
@ -68,12 +68,16 @@ SELECT
|
|||||||
,s.pdate
|
,s.pdate
|
||||||
,s.descr
|
,s.descr
|
||||||
,s.amount
|
,s.amount
|
||||||
,s.category
|
--,s.category
|
||||||
,s.party
|
,s.party
|
||||||
,s.reason
|
,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
|
,sum(s.amount) over (ORDER BY s.pdate asc, s.id) + 28452.02 netbalance
|
||||||
FROM
|
FROM
|
||||||
stacked s
|
stacked s
|
||||||
ORDER BY
|
ORDER BY
|
||||||
s.pdate desc
|
s.pdate desc
|
||||||
|
,s.id desc
|
||||||
|
Loading…
Reference in New Issue
Block a user