Jump to content

Find number of regular users and how long they tend to be users


Staggan

Recommended Posts

Hello

 

I am trying to work out how many regular users I have to my site and how long those users tend to be users..

 

So, I have a table that logs every time a user visits my site and logs in, it stores the date / time as a unix timestamp and it logs their user id.

 

I started by getting the id's of any user who logs in more than 5 times in a specified period, but now I want to extend that...

 

 
SELECT userID as user, count(userID) as logins FROM login_history where timestamp > UNIX_TIMESTAMP('2014-06-01 00:00:00') and timestamp < UNIX_TIMESTAMP('2014-07-01 00:00:00') group by user having logins > 5;
 
 
So ideally a number of users in each month that visited over x times, users who visited at least x times for 3 months, 6 months, 9 months, 12 months..
 
 
Any suggestions would be appreciated 

Thanks
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.