Here's a sample query I have:
metadata.event_type = "EMAIL_TRANSACTION" and network.direction = "INBOUND" " $url = about.url $url in %IOC_List match: $url outcome: $Total_Email_Count = count_distinct(metadata.id) $Total_Email_Allowed=sum(if(security_result.action!="BLOCK", 1,0)) $Total_Email_Blocked=sum(if(security_result.action="BLOCK", 1,0)) order: $Total_Email_Count desc
My goal is to check if a url came up in inbound emails and return counts by a simplified version set of variables for security_result.action - if not explicitly blocked, count it as "Allowed" (along with a total count of emails). My problem is that about.url is an array of values, where the same url can come up several times - meaning my total email count might be 10, but my total allowed is 20, because each email is counted twice under $Total_Email_Allowed because the url is in about.url twice. Any suggestions?
Stats Query - How to Avoid Doublecounting
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.