- or download this
SELECT @columns, COUNT(*)
FROM $table
GROUP BY @columns
HAVING COUNT(*) > 1
- or download this
@key_cols1 = qw(account_id group_id);
@key_cols2 = qw(account_id manager_id asset_id);
# Later...
...
. 'FROM ' . $table1_name
. 'WHERE ' . $table1_cond
# You get the idea