-- where count(col) > 1 select fk, count(value) from table group by fk having count(value) > 1; -- http://stackoverflow.com/questions/1804731/where-countcol-1