Created
October 3, 2013 15:47
-
-
Save alancoleman/6812054 to your computer and use it in GitHub Desktop.
Make two counts at the same time, the first of all users, the second of all active users.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT COUNT(*) AS users, COUNT(IF(a.active BETWEEN '2013-09-01 00:00:00' AND '2013-09-31 23:59:59',1,NULL)) AS active | |
FROM lsoncc_Users AS u | |
LEFT JOIN lsoncc_UsersFlags AS a | |
ON u.userid = a.userid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment