Для этого вам нужно использовать DENSE_RANK:
SELECT g.[Id],
g.[FirstName],
g.[LastName],
g.[Email],
g.[Count_Invited],
g.[Count_Registered],
r.[DateReservation],
r.[AmountPersons],
Dense_rank() over(order by g.[Count_Invited], g.[Count_Registered] DESC) AS seqnum
FROM Users g
INNER JOIN Reservation r ON r.[UserId] = g.[Id]
WHERE r.[EventId] = 21
Ниже приведен пример, который я пробовал:
DECLARE @table table(invited int, registered int)
insert into @table VALUES(0,3), (0,1), (0,1), (1,2),(1,2),(1,2),(1,2),(1,2),(1,1),(1,1);
SELECT invited,registered, dense_rank() over(order by invited, registered desc) as seqnum
from @table
+---------+------------+--------+
| invited | registered | seqnum |
+---------+------------+--------+
| 0 | 3 | 1 |
| 0 | 1 | 2 |
| 0 | 1 | 2 |
| 1 | 2 | 3 |
| 1 | 2 | 3 |
| 1 | 2 | 3 |
| 1 | 2 | 3 |
| 1 | 2 | 3 |
| 1 | 1 | 4 |
| 1 | 1 | 4 |
+---------+------------+--------+