SELECT t.* FROM aps_tailor_instruction t, (
SELECT styleNumber, COUNT(styleNumber), NAME, COUNT(NAME)
FROM aps_tailor_instruction WHERE factoryId=696 AND disabled=0
GROUP BY styleNumber, NAME
HAVING (COUNT(styleNumber) > 1) AND (COUNT(NAME) > 1)
) a
WHERE t.styleNumber=a.styleNumber AND
t.name=a.name