title: how to find duplicate rows in postgres?
body: <p>I feel weeks ago I asked a question about counting identical rows in one dataset. This is an answer I received:</p>
  
  <pre><code>select count(*), a_dttm, b_dttm, c_dttm 
  from data 
  group by a_ddtm, b_dttm, c_dttm;
  </code></pre>
  
  <p>I know that there are duplicates in this other dataset and they're messing up my count. As of right now, I know what id is used multiple times, but it doesn't necessarily mean it that those rows are duplicated.</p>
  
  <pre><code>select id, count(*) as count
  from (
  select *
  from data
  where date &gt;= '2016-01-01' and date &lt;= '2016-12-31'
  ) as a
  group by id
  having count(*) &gt;= 2
  order by count desc
  </code></pre>
  
  <p>My question is how can I select all the rows that are <strong>completely</strong> identical in my dataset? Would I write a subquery for each column or select * ?</p>