I have a table MyTable with columns:
ID number (autoincrement)
STAT number(3) (status: 1-start, 2-stop)
USER varchar2(15) (user name)
DATE date (date)
with data:
ID STAT USER DATE
---------------------------------------
1 1 USER1 18.08.2010 13:10:14
2 2 USER1 18.08.2010 15:15:40
3 1 USER1 18.08.2010 16:15:10
4 2 USER1 18.08.2010 18:35:32
5 1 USER2 18.08.2010 07:05:46
6 2 USER2 18.08.2010 13:10:01
7 1 USER1 19.08.2010 09:01:10
8 2 USER1 19.08.2010 16:15:19
9 1 USER2 19.08.2010 11:02:56
10 2 USER2 19.08.2010 18:45:22
How do I get something like this:
USER DATE DURATION
--------------------------------
USER1 18.8.2010 04:25:48
USER2 18.8.2010 06:04:15
USER1 19.8.2010 07:14:09
USER2 19.8.2010 07:42:26