Reputation: 43
I have a table for users where I have a date type column which stands for the date that they created their accounts and I wanted to count the rows of that table that were added "today" so that I could see how many people created an account everyday.
What's the most effiecient way to do this?
Upvotes: 0
Views: 462
Reputation: 10163
You just can use GROUP BY
statement and get count of accounts created per date:
SELECT CreateDate, COUNT(*) as UsersCount FROM Users GROUP BY CreateDate;
Upvotes: 1