首页 > 解决方案 > Azure 分析查询行数

问题描述

我想计算查询中的行数。这在 azure 分析查询语言中是否可行?我该怎么做?

requests
| where name == "MyName"
| summarize by tostring(customDimensions.myCustomProperty)

结果:customDimensions_myCustomProperty item1 item2 item3 item4

在 SQL 中,我会这样做:

select count(distinct(customDimensions.myCustomProperty)
from requests
where name == "MyName"

标签: azure-log-analytics

解决方案


找到了:

requests
| where name == "MyName"
| summarize by tostring(customDimensions.myCustomProperty)
| summarize count()

推荐阅读