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 do
The accepted soultion doesn't work for me - it returns a "1" for each unique email address in the table.
This is what I had to do to get the info I needed:
select email, count(email) AS total from sysAccessLog group by email order by total desc
Which returns a list of email addresses and the number of occurrences.