MySQL counts items in a database based on how many unique values there are in a field
(Sorry for the title, I really don't know how the phrase is :-))
I have a table with date and uid fields.
I need to get the uid count for each date, currently I am doing this in php doing multiple queries like this:
SELECT COUNT(uid) FROM users where Date = 'xxx';
Is there an easy way to achieve this with just an SQL query?
+2
a source to share
3 answers