我有以下查询:
customEvents
| summarize count(datepart("Second", timestamp) )
by toint(customMeasurements.Latency)
这是计算一分钟后的秒数并将其按整数分组Latency
。
如何向其中添加order by
运算符以按这些列排序?
我有以下查询:
customEvents
| summarize count(datepart("Second", timestamp) )
by toint(customMeasurements.Latency)
这是计算一分钟后的秒数并将其按整数分组Latency
。
如何向其中添加order by
运算符以按这些列排序?
为此,您需要为列设置别名。
别名列是通过在值前面加上前缀来执行的column_alias=
。
customEvents
| summarize Count=count(datepart("Second", timestamp) )
by Latency=toint(customMeasurements.Latency)
然后我们可以通过它们的别名来引用这些列:
customEvents
| summarize Count=count(datepart("Second", timestamp) )
by Latency=toint(customMeasurements.Latency)
| order by Latency asc nulls last