col1 100 100 200 200 300 400 400 400 using partition By col1 get the rank col1 rank 100 1 100 1 200 1 200 1 300 1 400 1 400 1 400 1
Anonymous
1y
SELECT
col1,
RANK() OVER (PARTITION BY col1 ORDER BY col1) AS rn
FROM
your_table;
Help your peers!
Add answer anonymously...
Popular interview questions of Big Data Engineer
>
Carelon Global Solutions Big Data Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app