Hi,
this might be the solution:
scott@oracle> select * from the_table;
EMPNO DAT AMOUNT
---------- ------------------- ----------
1 31.08.2001 17:22:02 100
2 31.08.2001 17:22:19 250
2 31.08.2001 17:22:32 220
3 31.08.2001 17:22:50 200
2 31.08.2001 17:23:01 200
2 31.08.2001 17:23:15 450
1 31.08.2001 17:23:25 275
7 rows selected.
scott@oracle>
1 select A.empno, A.dat, A.amount, B.total
2 from
3 the_table A,
4 (select empno, sum(amount) as total from the_table group by empno) B
5 where A.empno=B.empno
6* order by empno, amount
EMPNO DAT AMOUNT TOTAL
---------- ------------------- ---------- ----------
1 31.08.2001 17:22:02 100 375
1 31.08.2001 17:23:25 275 375
2 31.08.2001 17:23:01 200 1120
2 31.08.2001 17:22:32 220 1120
2 31.08.2001 17:22:19 250 1120
2 31.08.2001 17:23:15 450 1120
3 31.08.2001 17:22:50 200 200
7 rows selected.
Regards, Ales