title: select max salary in sql
body: <h3>Emp table</h3>
  
  <pre><code>id          ename
  ----------- ----------
  1           apv
  2           sug
  3           raj
  4           ram
  5           sam
  6           apv1
  7           sug1
  8           raj1
  9           ram1
  10          sam1
  </code></pre>
  
  <h3>Dept Table</h3>
  
  <pre><code>dept  salary      id
  ----- ----------- -----------
  a     1000        1
  b     2000        2
  c     3000        3
  d     5000        4
  e     7000        5
  a     20000       6
  b     500         7
  c     5000        8
  a     1000        9
  b     90000       10
  </code></pre>
  
  <p>How can I return both the <code>Max(salary)</code> from each dept and also the details of who earns that salary?
  (select id,ename,dept,salary)</p>