Created
April 13, 2016 15:23
-
-
Save victorpendleton/0974f8e1acb5a6c540643ef0e8e96662 to your computer and use it in GitHub Desktop.
This file contains 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 user | |
, group_concat(time) | |
, count(*) | |
FROM information_schema.processlist | |
WHERE user NOT IN ('some_user') -- Filter out users | |
AND time > ## -- Filter by time | |
AND command NOT IN ('sleep') -- Filter by command | |
GROUP BY 1 | |
ORDER BY 3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment