Viewing post 1 (of 1 total)
Check it out!!
select ename,Ra.sal,Ra.deptid
from salary_raj as Ra
Inner Join (select max(sal) as S,deptid
from salary_raj
group by deptid) as P on P.S=Ra.sal and Ra.deptid=P.deptid
order by Ra.deptid
Hope this helps.
Cheers
September 7, 2010 at 6:53 am
#1217291