title: Select distinct from another select results
body: <p>I want to select distinct results from another select statement results
  e.g;</p>
  
  <pre><code>select distinct from(select * from table)
  </code></pre>
  
  <p>following is result of inner select</p>
  
  <pre><code>testing department      9998901036      GOLD    
  testing department      9998901036      GOLD
  </code></pre>
  
  <p>I want to get distinct from above select result.</p>