MySQL count elements in a database based on how many unique values there are in a field -


(Sorry for the title, I do not really know that :-))

I have There is a table with a date and a UID field.

I need to get the number of UIDs for each date, currently I am running it in many ways in PHP, in many ways:

  COUNT (UID) users from where date = 'xxx';  

Is this an easy way to gain with just one SQL query?

Use block by group:

  selection date, COUNT (UID) date from user group;  

Comments