Experts Exchange connects you with the people and services you need so you can get back to work.
select row_number() over(parition by <all your columns> order by (select 1)) rn,* from <your table>
select * from cte where rn>1
Open in new window
Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.
SUM(duplicate_rows) OVER ( partition BY (SELECT 1)) sum_duplicate_rows
FROM (SELECT Column1,Column2,Column3,Column4,COUNT(Column4) AS duplicate_rows
GROUP BY Column1,Column2,Column3,Column4
HAVING COUNT(Column4) > 1) t1
ORDER BY duplicate_rows DESC
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.