title: How to select distinct rows without using group by statement
body: <pre><code>A B C
  1 1 1 
  1 1 1 
  2 2 2 
  2 2 2 
  3 3 3 
  3 3 3 
  4 4 4 
  4 4 4 
  5 5 5 
  5 5 5 
  5 5 5 
  6 6 6
  6 6 6 
  </code></pre>
  
  <p>I am to output only the distinct rows without using the group by statement. I cannot use group by because it makes mysql hang. So it should return</p>
  
  <pre><code>1 1 1
  2 2 2 
  3 3 3 
  4 4 4 
  5 5 5 
  6 6 6 
  </code></pre>
  
  <p>I am using DISTINCT in for an inner join.This does not work either:</p>
  
  <pre><code>SELECT DISTINCT * FROM TABLEA inner join TABLEB on TABLEA.A = TABLEB.A 
  </code></pre>