|
-
Simple RANK
I'm not sure if I've missed something, should this return rank 1 and 2 for '0001'?
If not, how can I fix this? I want to see the rankings for each group of COL1.
THANKS!
DEVEL3 SQL>select * from xxx;
COL1 COL2
---------- --------------------
0001 test1
0001 test2
0002 test3
1 select col1, col2,
2 rank() over (partition by col1 order by col1)
3* from xxx
DEVEL3 SQL>/
COL1 COL2 RANK()OVER(PARTITIONBYCOL1ORDERBYCOL1)
---------- -------------------- --------------------------------------
0001 test1 1
0001 test2 1
0002 test3 1
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
|