Reputation: 19589
How to count rows with distinct values on any of the three columns: col1
, col2
, col3
?
Upvotes: 1
Views: 194
Reputation: 57996
Blind kick:
SELECT count(*) FROM YourTable
WHERE Col1 <> Col2 OR Col1 <> Col3 OR Col2 <> Col3
Upvotes: 0