title: Select DISTINCT returning too many records
body: <p>I have two tables: Products and Items. I want to select <code>distinct</code> items that belong to a product based on the <code>condition</code> column, sorted by <code>price ASC</code>.</p>
  
  <pre><code>+-------------------+
  | id | name         |
  +-------------------+
  | 1 | Mickey Mouse  |
  +-------------------+
  
  +-------------------------------------+
  | id | product_id | condition | price |
  +-------------------------------------+
  | 1  | 1           | New       | 90   |
  | 2  | 1           | New       | 80   |
  | 3  | 1           | Excellent | 60   |
  | 4  | 1           | Excellent | 50   |
  | 5  | 1           | Used      | 30   |
  | 6  | 1           | Used      | 20   |
  +-------------------------------------+
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>+----------------------------------------+
  | id | name          | condition | price |
  +----------------------------------------+
  | 2  | Mickey Mouse  | New       | 80    |
  | 4  | Mickey Mouse  | Excellent | 50    |
  | 6  | Mickey Mouse  | Used      | 20    |
  +----------------------------------------+
  </code></pre>
  
  <p>Here's the query. It returns six records instead of the desired three:</p>
  
  <pre><code>SELECT DISTINCT(items.condition), items.price, products.name
  FROM products
  INNER JOIN items ON products.id = items.product_id
  WHERE products.id = 1
  ORDER BY items."price" ASC, products.name;
  </code></pre>