Skip to content
Advertisement

SQL query to find duplicate records and discount from COUNT

I am using below SQL query to count the records. I would like to discount the duplicate testID after I got the count.

example:

above query give 5 records

I want to get the count = 5 – duplicate 2 = 3

Is there SQL query I can use to find out the duplicate records, then calculate the final count?

Advertisement

Answer

Please use below query,

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement