Hi All,
Many of us might have come across a requirement to implement running totals. Below are few of the implementations.
Consider a bank maintains account and balance details as below.
Many of us might have come across a requirement to implement running totals. Below are few of the implementations.
Consider a bank maintains account and balance details as below.
Running total should give the sum of balance from beginning to current month.
SELECT acc_no, acc_type,Yr_Mnth, bal, SUM(bal) OVER (PARTITION BY (acc_no,acc_type) ORDER BY Yr_Mnth) FROM bnk_bal;
Thank you for useful information
ReplyDeletePython Online Training Course
Python Developer Course Online Training