Run Code  | Code Wall  | Users  | Misc  | Feedback  | About  | Login  | Theme  | Privacy 

How to find 2nd highest salary

Language: Editor: Layout:
View schema
Execution time: 0,02 sec, rows selected: 16, rows affected: 7, absolute service time: 0,21 sec, absolute service time: 0,22 sec 
edit mode |  history  | discussion
   id sal
1 2 500
2 3 400
3 5 400
4 6 350
5 7 350
6 4 200
7 1 100
   id sal
1 3 400
2 5 400
   id sal dn
1 2 500 1
2 3 400 2
3 5 400 2
4 6 350 3
5 7 350 3
6 4 200 4
7 1 100 5