title: Group-wise Maximum of a Certain Column
body: <p>I've got the table:</p>
  
  <pre><code>SELECT * FROM shop;
  
  +---------+--------+------
  | article | dealer | price
  +---------+--------+------
  |    0001 | A      |  3.45
  |    0001 | B      |  3.99
  |    0002 | A      | 10.99
  |    0003 | B      |  1.45
  |    0003 | C      |  1.69
  |    0003 | D      |  1.25
  |    0004 | D      | 19.95
  +---------+--------+------
  7 rows in set (0.20 sec)
  </code></pre>
  
  <p>And I want to get - for each article - the dealer or dealers with the most expensive price.</p>
  
  <p>Could anyone tell me why this doesn’t work?</p>
  
  <pre><code>SELECT article, dealer, MAX(price) FROM shop GROUP BY(article);
  </code></pre>
  
  <p>For this query, I get the following result-set; </p>
  
  <pre><code>+---------+--------+------------+
  | article | dealer | MAX(price) |
  +---------+--------+------------+
  |    0001 | A      |       3.99 |
  |    0002 | A      |      10.99 |
  |    0003 | B      |       1.69 |
  |    0004 | D      |      19.95 |
  +---------+--------+------------+
  4 rows in set (0.03 sec)
  </code></pre>
  
  <p>Although the max prices are correct, I got the wrong dealers for some articles.</p>