SQL Query To Get Only Duplicates
The below SQL query we can get only Duplicates:
SELECT NAME,EMAIL,COUNT(*)
FROM DA31.TABLE1
GROUP BY NAME,EMAIL
HAVING COUNT(*) > 1;
So, after running this query we get only duplicate rows of NAME and EMAIL.
SELECT NAME,EMAIL,COUNT(*)
FROM DA31.TABLE1
GROUP BY NAME,EMAIL
HAVING COUNT(*) > 1;
So, after running this query we get only duplicate rows of NAME and EMAIL.
Comments
Post a Comment