Gayathri,

 When 'ranking', all values which are equal must have equal ranks. You asked
for ranking, but what you have show in your example is simply 'numbering'.

Tajinder's solution will give you numbering if that is what you really want.

Mike


On Fri, Mar 11, 2011 at 12:08 AM, tajinder singh <[email protected]>wrote:

> You can use this Query
>
> select
> id, ROW_NUMBER( ) OVER (PARTITION BY
>
> ID ORDER BY ID) cou
> from
> taji
>
> Thanks
> Tajidner
>
>
> On Fri, Mar 11, 2011 at 11:08 AM, gayathri Dev <[email protected]> wrote:
>
>> Hi All,
>>
>> Is there any analytical function that can achieve this ?
>>
>> I have a column whose values are as below:
>>
>> ID
>> ----
>>
>> 22
>> 22
>> 33
>> 33
>> 44
>> 44
>>
>> I want to rank them as:
>>
>> 22 - 1
>> 22 - 2
>> 33 - 1
>> 33 - 2
>> 44 - 1
>> 44 - 2
>>
>> Thanks in advance.
>>
>> ~G
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Oracle PL/SQL" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/Oracle-PLSQL?hl=en
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Oracle PL/SQL" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/Oracle-PLSQL?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to