In a [member] table, some rows have the same value for the email column.
email
login_id | email ---------|--------------------- john | john123@hot
First part of accepted answer does not work for MSSQL. This worked for me:
select email, COUNT(*) as C from table group by email having COUNT(*) >1 order by C desc