title: How to remove duplicates in a subquery using distinct in oracle
body: <p>I want to remove duplicate rows returned from this sql:</p>
  
  <pre><code>Select
        *
      From (Select
        Security_Symbol,
        Security_Name,
        date1,
        time1,
        last1,
        Changefromopen,
        percentchangefromopen
      From
        xgdv
      Where
        Security_Symbol In ('abc', 'def', 'ghi')
      Order By
        date1 desc,
        time1 asc) where rownum &lt;= 3
  </code></pre>
  
  <p>Using a distinct in subquery doesn't remove duplicate records.</p>
  
  <p>What's wrong with using distinct in subquery. How do I achieve this?</p>