Created
September 9, 2016 21:30
-
-
Save kerbelp/7161037e550299cfc85d5eb2072cf36e 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 recordtime, | |
username, | |
dbname, | |
remotehost, | |
remoteport | |
FROM stl_connection_log | |
WHERE event = 'initiating session' | |
AND pid NOT IN (SELECT pid | |
FROM stl_connection_log | |
WHERE event = 'disconnecting session') | |
ORDER BY 1 DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment