dup_rows.sql

select distinct field1, count(*) from test_table a 
where a.rowid <> ( select max(rowid) 
                   from test_table where field1=a.field1)
group by field