Forked from anonymous/GetUniqueHorizonViewExternalUsers.sql
Created
June 14, 2017 09:56
-
-
Save nmanzi/5be7ee7a814101e1b63aeaa37c5e0745 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 distinct event_data.StrValue | |
from (select distinct event.EventID | |
from event inner join viewevents.dbo.event_data | |
on event_data.EventID = ViewEvents.dbo.event.EventID | |
where EventType = 'BROKER_USERLOGGEDIN' and | |
Time >= '2017-05-01' and | |
event_data.StrValue NOT LIKE '10.%' and | |
event_data.StrValue NOT LIKE '172.1%' and | |
event_data.StrValue NOT LIKE '192.168.%' and | |
and event_data.Name = 'ClientIPAddress') t inner join ViewEvents.dbo.event_data on t.EventID = ViewEvents.dbo.event_data.EventID | |
where event_data.Name = 'UserDisplayName' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment