title: T-SQL, Select first row of a set
body: <p>I have a table that is setup like so:</p>
  
  <pre><code>ID        int
  Hash      varchar
  OtherID   int
  </code></pre>
  
  <p>Some Example data:</p>
  
  <pre><code>1   3pm6Qav1Vd   23
  2   3pm6Qav1Vd   2
  3   3pm6Qav1Vd   19
  4   3pm6Qav1Vd   17
  5   RSUBe2VBtl   2
  6   3pm6Qav1Vd   4
  7   3pm6Qav1Vd   21
  8   RSUBe2VBtl   23
  9   RSUBe2VBtl   19
  </code></pre>
  
  <p>I would like to be able to pull out just the first row of each hash set:</p>
  
  <pre><code>1   3pm6Qav1Vd   23
  5   RSUBe2VBtl   2
  </code></pre>
  
  <p>The rows would each be the lowest ID for each Hash. I'm using T-SQL on SQL Server 2005. I'm not really sure where to begin on this one.</p>