Could possibly use HAVING instead of Subquery.

```SELECT $columns, COUNT(*) AS c
FROM $tableName
GROUP BY $columns
HAVING c > 1```