I have a table named department, which has following data
DNO DNAME SALARY
20 EE 30000
10 DoC 50000
30 ITS 20000
I want to select employee with maximum and minimum salary WITHOUT using GROUP functions or top-n analysis or NOT EXISTS command. Any help will be appreciated. Thanks
For max. salary:
For min salary:
Both solutions assume that salary can not be null