azure-log-analytics - 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"
解决方案
找到了:
requests
| where name == "MyName"
| summarize by tostring(customDimensions.myCustomProperty)
| summarize count()
推荐阅读
- c# - 如何在 WPF 应用程序中的项目之间传递属性?
- mongodb - MongoDB和并发
- vue.js - 如何控制“b-form-checkbox-group”中多个复选框的呈现
- three.js - Autodesk forge viewer api v7.* 对齐多个 2d dwg 模型
- angular - 当焦点出现在 Mat-Select 上时,在 Angular 中打开 Mat-Select 下拉菜单
- excel - 无法同步使用 Power Pivot 创建的数据透视表
- python - 计算特定月份收到的总罚款
- r - 是否可以将 GIF 添加到 R Markdown 报告中?
- r - 为什么数据没有绘制在 R 中的全局地图之上?
- reactjs - 学习者问题:一种根据状态有条件地设置一组字段样式的方法