tps/database/reports/chase_bal.sql

15 lines
282 B
MySQL
Raw Normal View History

2024-08-28 12:50:42 -04:00
\timing
SELECT
r.id
,r.logid
,r."Type"
,r."Trans Date"
,r."Post Date"
,r."Description"
,-r."Amount" "Amount"
,SUM(-r."Amount") OVER (ORDER BY r."Post Date" asc , r.id) + 374.23 balance
FROM
tpsv.chase_default r
ORDER BY
r."Post Date" desc