What query will count the number of rows, but distinct by three parameters?
Example:
Id Name Address
==============================
1 MyName MyAddress
2 MySecondName Address2
Something like:
select count(distinct id,name,address) from mytable
To get a count of the number of unique combinations of id
, name
and address
:
SELECT Count(*)
FROM (
SELECT DISTINCT
id
, name
, address
FROM your_table
) As distinctified