how to find duplicates in sql updated