title: Distinct on specific column in Hive
body: <p>I am running Hive 071 I have a table, with mulitple rows, with the same column value e.g.</p>
  
  <p>| x | y |  </p>
  
  <hr>
  
  <p>| 1 | 2 |<br>
  | 1 | 3 |<br>
  | 1 | 4 |<br>
  | 2 | 2 |<br>
  | 3 | 2 |<br>
  | 3 | 1 |   </p>
  
  <p>I want to have the x column unique, and remove rows that have the same x val e.g.</p>
  
  <p>| x | y |  </p>
  
  <hr>
  
  <p>| 1 | 2 |<br>
  | 2 | 2 |<br>
  | 3 | 2 |  </p>
  
  <p>or</p>
  
  <p>| x | y |  </p>
  
  <hr>
  
  <p>| 1 | 4 |<br>
  | 2 | 2 |<br>
  | 3 | 1 |  </p>
  
  <p>are both good as distinct works only on the whole rs in hive, I couldn't find a way to do it</p>
  
  <p>help please Tx</p>