title: SQL: how to find maximum value items according a attribute
body: <p>I am a beginner of SQL, having this table instructor:</p>
  
  <pre><code>ID     name   dept_name   salary
  001     A       d01        1000
  002     B       d02        2000
  003     C       d01        3000
  ...
  </code></pre>
  
  <p>I am writing a code to find people who have highest salary in each department like:</p>
  
  <pre><code>name      dept_name
   C           d01
   B           d02
  </code></pre>
  
  <p>I do know how to find maximum value 
  but I have no idea how to use it by according dept_name for all each department.</p>