You are right Mike, I was looking for numbering not ranking. so Tajinder's solution works for me.
Thanks a lot Tajinder. ~G On Fri, Mar 11, 2011 at 10:08 AM, Michael Moore <michaeljmo...@gmail.com>wrote: > 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 <taji.si...@gmail.com>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 <gd0...@gmail.com> 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 Oracle-PLSQL@googlegroups.com >>> To unsubscribe from this group, send email to >>> oracle-plsql-unsubscr...@googlegroups.com >>> 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 Oracle-PLSQL@googlegroups.com >> To unsubscribe from this group, send email to >> oracle-plsql-unsubscr...@googlegroups.com >> 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 Oracle-PLSQL@googlegroups.com > To unsubscribe from this group, send email to > oracle-plsql-unsubscr...@googlegroups.com > 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 Oracle-PLSQL@googlegroups.com To unsubscribe from this group, send email to oracle-plsql-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en