find rows with same column value sql code example
Example 1: sql check same row
// select duplicate -------------
-- users (name, email) --
// -------------------------------
SELECT
id, school_id, COUNT(*)
FROM
booster_school_languages
GROUP BY
id, school_id
HAVING
COUNT(*) > 3
Example 2: select all same column value in sql
SELECT RollId, count(*) AS c FROM `tblstudents` GROUP BY RollId HAVING c > 1 ORDER BY c DESC