SQL_row_number_1.htm
Objective : row_number(), over partition
select ename, deptno, row_number() over (partition by deptno order by ename) rn from emp
postgresql