WordPress DB Query to count number of users registered per day

I would like to know the number of users that registered each day in WordPress via a SQL query.

I am aware to do this properly we’d need a table of all the dates or some funky query to emulate the dates, however I’m after the simple option and it’s OK to skip days with 0 registrations.

Read More

An output something like this would be amazing:

day        total_users
01-01-2014    10
02-01-2014    19
etc....
23-04-2014    5

Note: I did check to see if there was a similar question asked, there was a generic one here, but not wordpress specific.

Matt

Related posts

Leave a Reply

1 comment

  1. In wordpress the user table is wp_users and you can run the following query to get what you are looking at

    select 
    count(*) as total_users ,
    date(user_registered) as reg_date 
    from wp_users 
    group by reg_date 
    having total_users > 0