how to get second highest salary department wise without using analytical functions?
问题 Suppose we have 3 employees in each department.we have total 3 departments . Below is the sample source table Emp deptno salary A 10 1000 B 10 2000 C 10 3000 D 20 7000 E 20 9000 F 20 8000 G 30 17000 H 30 15000 I 30 30000 Output B 10 2000 F 20 8000 G 30 17000 With using analytic function dense_rank we can achive the second highest salary dept wise. Can we achieve this without using ANY analytic function ??? Is Max() is also analytic function ?? 回答1: It is a pain, but you can do it. The