À, tôi nghĩ tôi đã tìm ra.
select a.*, sum(Amount) over (partition by Location, Product order by Date) as Running_Amt
from Example_Table a
À, tôi nghĩ tôi đã tìm ra.
select a.*, sum(Amount) over (partition by Location, Product order by Date) as Running_Amt
from Example_Table a