Q&A for students, teachers, and linguists wanting to discuss the finer points of the Chinese language
with x as ( select 'a' vc, 1 num union all select 'a' vc,2 union all select 'a' vc,2 ) select x.*, DENSE_RANK() OVER (ORDER BY num DESC) rnk from x