Query to rank [message #248312] |
Thu, 28 June 2007 10:51 |
mvnrajan
Messages: 5 Registered: June 2007
|
Junior Member |
|
|
Hi guys,
Am strugling to write a query. I need output as follows.
I have companyid with duplicates in a table. That table contains
only companyid. For example, only 2 companyid exist in table with duplicates.
Column SEQ has to display as 1 for first companyid and 2 for second companyid.DRANK column has to display a rank corresponding to companyid.
I need a output as follows
Any guys please..........
companyid ID SEQ RANK
----------------------------------------
CH46911 1 1
CH46911 1 2
CH46911 1 3
CH46911 1 4
GB24158 2 1
GB24158 2 2
GB24158 2 3
GB24158 2 4
-
Attachment: aaa.txt
(Size: 0.26KB, Downloaded 542 times)
|
|
|
|
|