; with cte as ( select b.UserId, b.Name, row_number() ove...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

; with cte as
(
    select
        b.UserId,
        b.Name,
        row_number() over(partition by b.Name order by date) as rnk
    from Badges as b
)
select Name, rnk
from cte
where UserId = (select Id from Users where DisplayName = 'Roman Pekar')

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results