SQL Count unique objects defined by parameters
- by Eduardo
I have a table with:
id | parameter
1 | A
1 | B
2 | A
3 | A
3 | B
That represent objects defined with the values as:
1 -> A,B
2 -> A
3 -> A,B
I want to count the number of objects with different parameters using a SQL query, so in this case it would be 2 unique objects as 1 and 3 have the same parameters.
The database is a Microsoft SQL Server 2000. But I do not mind knowing the solution for other databases.