title: Distinct pair of values SQL
body: <p>Consider</p>
  
  <pre><code> create table pairs ( number a, number b ) 
  </code></pre>
  
  <p>Where the data is </p>
  
  <pre><code>1,1
  1,1
  1,1
  2,4
  2,4
  3,2
  3,2
  5,1
  </code></pre>
  
  <p>Etc. </p>
  
  <p>What query gives me the distinct values the number column b has So I can see</p>
  
  <pre><code>1,1
  5,1
  2,4
  3,2
  </code></pre>
  
  <p>only </p>
  
  <p>I've tried</p>
  
  <pre><code>select distinct ( a ) , b from pairs group by b 
  </code></pre>
  
  <p>but gives me "not a group by expression" </p>