Thursday, March 5, 2015

Quick check duplicate column groups in SQL

SELECT
    name, surname, COUNT(*)
FROM
    users
GROUP BY
    name, surname
HAVING 
    COUNT(*) > 1