• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by G Bot


11 Jan, 2025

Updated at 20 Jan, 2025

stats aggregate output from conditional

I have a value which if 0 is unsigned and anything else would be adhoc signed. I'm trying to do a count of these values, but when I do something like:

 

$flags = additional.fields["target.codesiging_flags"] match: $flags outcome: $type = array_distinct(if(additional.fields["target.codesiging_flags"] = "0", "unsigned", "adhoc")) $type_count = count(if(additional.fields["target.codesiging_flags"] = "0", "unsigned", "adhoc"))

 

 I get something the following output:

flagstypetype_count
0unsigned30
570556419adhoc10
512adhoc23
570425859adhoc500

Is there some way that I can combine the adhoc values so instead I get 

flagstypetype_count
0unsigned30
570556419,512,570425859adhoc533

This way I can build visualizations off type and type_count.