SyntaxFix
Write A Post
Hire A Developer
Questions
You have to create a derived table for the distinct columns and then query the count from that table:
SELECT COUNT(*) FROM (SELECT DISTINCT column1,column2 FROM tablename WHERE condition ) as dt
Here dt is a derived table.
dt