LAST_VALUE(empno) OVER( PARTITION BY deptno ORDER BY empno ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)AS 'last', NTH_VALUE(empno,2) OVER( PARTITION BY deptno ORDER BY empno)AS 'nth_2' FROM emp; empno deptno first last nth_2 --- --- --- --- --- 7782 10...