Ahm*_*mad 5 kql azure-data-explorer
我是 Kusto 的新手,我正在尝试使用summarize可以指定要显示要分组的值的其他列的位置进行分组。
这就是我想要做的,在标准 SQL 中提到:
select UserId, LocationId, COUNT(*) as ErrorCount from SampleTable where ResultType != 'Success'
group by UserId
order by ErrorCount desc
Run Code Online (Sandbox Code Playgroud)
我按 分组UserId,但随后我也在分组结果中显示LocationId了UserId
将上面的内容转换为 Kusto,我写的是:
SampleTable
| where ResultType != "Success"
| summarize ErrorCount=count() by UserId
| project UserId, LocationId, ErrorCount
| sort by ErrorCount desc
Run Code Online (Sandbox Code Playgroud)
但这不起作用。Kusto 抱怨说它无法确定是否LocationId在第四行。我使用 Kusto 的explain关键字验证了我正在编写正确的 Kusto 查询。所以有什么问题 ?
| 归档时间: |
|
| 查看次数: |
12187 次 |
| 最近记录: |