Hi Reto, I was wondering how would you get the popularity ranking of a name? For example, what’s the ranking of name Emma among most popular female names of U.S. I wrote this query to fetch 100 most popular names and ranked them. However, when I add ‘where name = “Emma” it returns the ranking always as 1.
sum(number) as Popularity,
dense_rank() over(partition by gender order by Popularity desc) AS rank
where gender = ‘F’
group by name, gender
order by Popularity desc