-
I get it, whats the confusion Abhay ??
Code:
sys@ACME.WORLD> desc test_serial
Name Null? Type
----------------------------------------------------- -------- ------------------------------------
ID NUMBER
ID_DATE DATE
TIME_LAPED NUMBER
sys@ACME.WORLD> insert into test_serial values (1, sysdate,1);
1 row created.
sys@ACME.WORLD> insert into test_serial values (1, sysdate,1);
1 row created.
sys@ACME.WORLD> insert into test_serial values (1, sysdate,1);
1 row created.
sys@ACME.WORLD> select * from test_serial;
ID ID_DATE TIME_LAPED
---------- --------- ----------
1 20-JUN-03 1
1 20-JUN-03 1
1 20-JUN-03 1
sys@ACME.WORLD> SELECT id, id_date, sum(TIME_LAPED) over (partition by id, trunc(id_date) order by id, id_date)
2 from test_serial;
ID ID_DATE SUM(TIME_LAPED)OVER(PARTITIONBYID,TRUNC(ID_DATE)ORDERBYID,ID_DATE)
---------- --------- ------------------------------------------------------------------
1 20-JUN-03 1
1 20-JUN-03 2
1 20-JUN-03 3
Amar
"There is a difference between knowing the path and walking the path."
-
Strange, but I aint getting it.
PS
Code:
us18:dba>select * from Test_Serial;
ID ID_DATE TIME_LAPSED
-------------------- --------- --------------------
2 20-JUN-03 1
2 20-JUN-03 1
2 20-JUN-03 1
us18:dba>SELECT Id, id_date, sum(time_lapsed) OVER(PARTITION BY ID,trunc(id_date) order by Id,id_date)from Test_Serial;
ID ID_DATE SUM(TIME_LAPSED)OVER(PARTITIONBYID,TRUNC(ID_DATE)ORDERBYID,ID_DATE)
-------------------- --------- -------------------------------------------------------------------
2 20-JUN-03 3
2 20-JUN-03 3
2 20-JUN-03 3
I do get with Windowing clause
Abhay.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|