How do I all the registered users on a day report

Posted by Nadal on Stack Overflow See other posts from Stack Overflow or by Nadal
Published on 2010-12-24T19:37:52Z Indexed on 2010/12/24 19:54 UTC
Read the original article Hit count: 202

Filed under:
|

I have a table called users where I have two columns: name and created_at. created_at column column is of type datetime and it stores the datetime when this user was created.

I need to know the number of users created for a given date range. Let's say I ask give me user report between 1-nov-2010 and 30-nov-2010 . I need something like this

1-nov-2010: 2 
2-nov-2010: 5

The problem I am running into is that created_at data has value upto second. How do I check if a created_at date falls within a given date.

Any help in solving this problem is appreciated.

I am using mysql5.

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql