Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select date, sum(amount), sum(sum(amount)) over (order by date) from
- (select ref date,amount, amount amtmx, 0 amtrk from rk where ctg='str' and db='01nrg' and ref is not null
- union all select date,-amount, 0, amount amtrk from rk where ctg='str' and db='01nrg' and ref is not null) t
- group by date
Advertisement
Add Comment
Please, Sign In to add comment