This commit is contained in:
wuaho 2021-08-15 15:17:48 +08:00
parent 53d9cd1594
commit ba9bb564dc

View File

@ -19,8 +19,11 @@ serverid = tuple((str(i) for i in df['serverid'].to_list()))
sql = f"""select `#account_id`, `#event_time`, `#event_name`,`#os`,`svrindex`, count() as n
from {db}.event
where
`#event_time`>addDays(now('UTC'),-3) and (
lower(`#os`) = 'windows'
or svrindex not in {serverid}
or svrindex is null )
group by `#account_id`, `#event_time`, `#event_name`,`#os`,`svrindex`
having n = 1 limit 2000"""