Based on the query mentioned in the comments i think you need ROW NUMBER OVER PARTITION. An example would be along the lines
Select ename, sal*12 as annualsal, com
ROW_NUMBER() OVER (PARTITION BY sal ORDER BY ename) as RowOrder FROM EMP_TABLE
WHERE sal < COM
Order by sal Desc
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.