mirror of
https://github.com/acedanger/budget-database.git
synced 2025-12-05 22:50:13 -08:00
moving to postgres
This commit is contained in:
18
postgres/views/runbal.sql
Normal file
18
postgres/views/runbal.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
drop view public.runbal;
|
||||
|
||||
create view public.runbal
|
||||
as
|
||||
select
|
||||
trxdate
|
||||
, trxdescription
|
||||
, trxamount
|
||||
, to_char(trxdate, 'day') day_of_week
|
||||
, sum(trxamount) over(
|
||||
order by
|
||||
trxdate
|
||||
, trxamount desc rows unbounded preceding
|
||||
) runningbal
|
||||
from
|
||||
public.budgetdetails
|
||||
|
||||
|
||||
Reference in New Issue
Block a user