我想做一个相当于以下SQL查询 -
(大致)
SELECT
Name,
application_Version
Rank() OVER (PARTITION BY application_Version ORDER BY CountOfEventNamePerVersion)
FROM
customEvents
假设我很容易得到CountOfCompanyPerVersion
字段。我想使用AIQL做同样的事情,但我无法做到这一点。这是我试过的查询 -
customEvents
| summarize count() by name, application_Version
| project name, application_Version, count_
| summarize x = count(count_) by application_Version
| where x = count_
基本上我想获得每个application_Version最常见的名称。我怎样才能做到这一点?
arg_max应该做的伎俩:
customEvents
| summarize count() by Name, application_Version
| summarize arg_max(count_, Name) by application_Version
| order by application_Version
| project application_Version, Name=max_count__Name