SELECT name, COUNT(email)
FROM users
GROUP BY email
HAVING COUNT(email) > 1
Multiple field=
SELECT username, email, COUNT(*)
FROM users
GROUP BY username, email
HAVING COUNT(*) > 1
Single field=
SELECT _column, COUNT(*)
FROM _table
GROUP BY _column
HAVING COUNT(*) > 1
• SELECT first_name, COUNT (first_name) FROM employees
GROUP BY first_name
HAVING (COUNT(first_name) > 1);
SELECT column1, column2, COUNT(*) as 'Count'
FROM tablename
GROUP BY column1, column2
HAVING Count(*) > 1
ORDER BY [Count] DESC;
select barcode, name, count(*)
from product
group by barcode, name
HAVING count(*) > 1