Skip to content

Instantly share code, notes, and snippets.

@ramannanda9
Created October 5, 2016 01:04
Show Gist options
  • Save ramannanda9/53080cccb15d8e687f34965865170000 to your computer and use it in GitHub Desktop.
Save ramannanda9/53080cccb15d8e687f34965865170000 to your computer and use it in GitHub Desktop.
Max Salary by Department
select e.ename, e.sal, d.dname from emp e,dept d where e.sal in (select max(e.sal) from emp e group by deptno) and e.deptno=d.deptno
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment