title: Select all columns from table group by column
body: <p>'test_table' contains a column called vendor, with char values from 1 to 9, 1 being highest priority. 'test_table' also has another column named match, with char values either 'I' or 'H', with 'I' receiving higher priority.  I want to return all rows with unique values in ID, prioritized by match, then vendor.  </p>
  
  <p>Test_Table</p>
  
  <pre><code>ID  Vendor  Match  
   1    3      I  
   1    2      I  
   1    4      H  
   2    1      H  
   2    1      I  
   3    1      H  
   3    2      I  
  </code></pre>
  
  <p>Results Desired  </p>
  
  <pre><code>ID  Vendor  Match   
  1     2   I  
  2     1   I   
  3     2   I  
  
  
  SELECT *
  FROM 
      (SELECT ROW_NUMBER() OVER (PARTITION BY ID ORDER BY ID) AS RowNo, * 
       FROM test_table) x
  WHERE RowNo = 1 
  ORDER BY ID
  </code></pre>
  
  <p>Any help would be greatly appreciated.  Thank you!</p>