SELECT PEC_ROLES_KEY, Count (PEC_ROLES_KEY) from DT_Roles Group by PEC_ROLES_KEY HAVING COUNT (PEC_ROLES_KEY)> 1;
This is a group by. . . Having. . example of.
After group by, it is like a WHERE clause.