I have employee table with empname, dept,salary
----------------------------------------------------------
in this i want to get highest salary paid employee in each dept
output as like
empname dept salary
Sql sub queries
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Joginder BangerRank #360 · 7K reputationPosted Feb 7, 2015, 7:40 AM EST
select top 1 * from employee group by dept order by salary desc