title: Get distinct of minimum value
body: <p>I have this table <code>test</code> in Hive.</p>
  
  <pre><code>+----------+-------+-------+
  |   name   | price | notes |
  +----------+-------+-------+
  | product1 |   100 |       |
  | product1 |   200 | note1 |
  | product2 |    10 | note2 |
  | product2 |     5 | note2 |
  +----------+-------+-------+
  </code></pre>
  
  <p>and I expect to get this result (distinct of products with minimum price)</p>
  
  <pre><code>+----------+-------+-------+
  |   name   | price | notes |
  +----------+-------+-------+
  | product1 |   100 |       |
  | product2 |     5 | note2 |
  +----------+-------+-------+
  </code></pre>
  
  <p>I can't use the following query because of different <code>notes</code> in <code>product1</code>.</p>
  
  <pre><code>SELECT name, MIN(price), notes
  FROM test
  GROUP BY name, notes;
  
  +----------+-------+-------+
  |   name   | price | notes |
  +----------+-------+-------+
  | product1 |   100 |       |
  | product1 |   200 | note1 |
  | product2 |     5 | note2 |
  +----------+-------+-------+
  </code></pre>