mysql query to find repeated values for each forignkey value code example
Example: find duplicate keys in mysql
SELECT col, COUNT(col) FROM table_name GROUP BY col HAVING COUNT(col) > 1;
SELECT col, COUNT(col) FROM table_name GROUP BY col HAVING COUNT(col) > 1;