Running total by grouped records in table
问题 I have a table like this (Oracle, 10) Account Bookdate Amount 1 20080101 100 1 20080102 101 2 20080102 200 1 20080103 -200 ... What I need is new table grouped by Account order by Account asc and Bookdate asc with a running total field, like this: Account Bookdate Amount Running_total 1 20080101 100 100 1 20080102 101 201 1 20080103 -200 1 2 20080102 200 200 ... Is there a simple way to do it? Thanks in advance. 回答1: Do you really need the extra table? You can get that data you need with a