How to get the row number equal when the name is the same in the SELECT statement?
When I try with following code:
SELECT
ROW_NUMBER() OVER (PARTITION BY BENFNAME ORDER BY BENFNAME DESC, BENFNAME DESC) AS ROWNUM
, BENFNAME, BENLNAME
, REMID, BENENATIONALITY
, CUSBENRELATION
FROM SEND
WHERE REMID = 445231
I need MEHARUN with the same row number, i.e. if any same name exit it should be in same row number.
Expected results:


Use Dense Rank instead of Row Number,