title: how to compare rows in the same sql table and get maximum value
body: <p>I have a table as follows </p>
  
  <pre><code>ID | Status ID | Value 
  1  |   1       |  100
  2  |   1       |  200
  3  |   1       |  300
  4  |   2       |  100 
  5  |   2       |  150
  6  |   2       |  200
  7  |   3       |  500
  8  |   3       |  300
  9  |   3       |  150
  </code></pre>
  
  <p>I need to get the maximum value within the status. so my result should look like the following </p>
  
  <pre><code>ID | Status ID | Value 
  3  |   1       |  300
  6  |   2       |  200
  7  |   3       |  500
  </code></pre>
  
  <p>I'm fairly new to SQL and would appreciate your inputs </p>