SELECT Plant , ISNULL(ProjectCode, '') AS 'ProjectCode' , ISNULL(ClientCode, '') AS 'ClientCode' , ProductCode , Version , COUNT(*) AS 'Count' FROM ProductMixes WHERE (ISNULL(Deleted,0) = 0) GROUP BY ISNULL(ProjectCode, '') , ISNULL(ClientCode, '') , Plant , ProductCode , Version HAVING COUNT(*) > 1 ORDER BY Plant , ISNULL(ProjectCode, '') , ISNULL(ClientCode, '') , ProductCode , Version DESC