mirror of
https://github.com/acedanger/budget-database.git
synced 2025-12-06 07:00:14 -08:00
18 lines
282 B
SQL
18 lines
282 B
SQL
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
|
|
|
|
|