I want a query to count the duplicate values in a column, e.g.,
total records=SELECT COUNT(column_name) FROM table_name;
distinct records=SELECT COUNT(DISTINCT column_name) FROM table_name;
duplicate count=total records-distinct records;
I want a query to count the duplicate values in a column, e.g.,
total records=SELECT COUNT(column_name) FROM table_name;
distinct records=SELECT COUNT(DISTINCT column_name) FROM table_name;
duplicate count=total records-distinct records;
A simplification of the SQL you provided:
SELECT Count(Column) - Count(DISTINCT Column)
FROM yourTable