title: Find duplicate entries in a column
body: <p>I am writing this query to find duplicate CTN Records in table1. So my thinking is if the CTN_NO appears more than twice or higher , I want it shown in my SELECT * statement output on top.</p>
  
  <p>I tried the following sub-query logic but I need pulls </p>
  
  <pre><code>  SELECT *
           table1 
     WHERE S_IND='Y'
       and CTN_NO = (select CTN_NO 
                       from table1 
                      where S_IND='Y' 
                        and count(CTN_NO) &lt; 2);
  order by 2
  </code></pre>