Name Dept. Sal "GP" "IT" 50000 "HP" "IT" 60000 "AB" "IT" 70000 "LP" "IT" 50000 "MP" "HR" 50000 "XP" "HR" 40000 "WP" "HR" 40000 "VP" "HR" 70000
select *, case when (rank() over(partition by dept order by sal))=1 then 'Lowest' end from employee
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)