title: SQL max() only returns 1 row if column has several max values
body: <p>This feels like a stupid question since it should have a simple answer, but I just can't find it. I have a table looking like this:</p>
  
  <pre><code>|-----|---|
  |  a  | b |
  |-----|---|
  | ALA | 2 |
  | ASP | 1 |
  | SER | 1 |
  | VAL | 2 |
  |-----|---|
  </code></pre>
  
  <p>What I need is to get the two rows with the maximum value (I don't know the values in advance) which means that my example above shoud give:</p>
  
  <pre><code>|-----|--------|
  |  a  | max(b) |
  |-----|--------|
  | ALA |   2    |
  | VAL |   2    |
  |-----|--------|
  </code></pre>
  
  <p>I'm trying </p>
  
  <pre><code>SELECT a, max(b) FROM table;
  </code></pre>
  
  <p>but it only gives the first maximum row:</p>
  
  <pre><code>|-----|--------|
  |  a  | max(b) |
  |-----|--------|
  | ALA |   2    |
  |-----|--------|
  </code></pre>
  
  <p>What do I miss?</p>