Sign in to follow this  
Xyp

Having some fun with SQL Today

Recommended Posts

So I am in theory craft, gathering notes, getting code bits together phase of some web stat tools. Worked up a fun little SQL query some of you might like to hit your players database with.

 

SELECT COUNT(*) FROM(SELECT DISTINCT MINPID FROM(SELECT IPADDRESS, MIN(PLAYERID) AS MINPID FROM PLAYERHISTORYIPS WHERE LASTUSED > 1461372905000 GROUP BY IPADDRESS));

 

If you are like me you are going to think the count is high. However I went through the output very carefully and there are absolutely no duplicate entries on the ip side or the playerid side, this means it is 100% unique IPs that also were not used by alts. The time is set to 1 month ago as of this post (meaning it gets unique player logins, with a last logout time within the last month). Going to have that be a php variable on the toolset.

 

Fun with stats! I will put out an alpha when you can actually see something, right now its just a buncha bits of code scattered on my messy desktop.

Edited by Xyp

Share this post


Link to post
Share on other sites

Inspired by what BDEW is doing, going to use my actual skills as a web dev, and maybe fanboi up some of Bdew's RMI tools that is being worked on to add into the admin side of the toolkit.

  • Like 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this