If I have three columns:
orderNumber, name, email
and I would like to count how many unique emails are in the table how would I go about doing so?
A statement like:
SELECT count(email) FROM orders
gives me the total count.
I tried SELECT DISTINCT count(email) FROM orders
but that does not seem to be giving me the numbers I am expecting.
See Question&Answers more detail:os