2

我有以下查询:

customEvents
| summarize count(datepart("Second", timestamp) ) 
    by toint(customMeasurements.Latency)

这是计算一分钟后的秒数并将其按整数分组Latency

如何向其中添加order by运算符以按这些列排序?

4

1 回答 1

2

为此,您需要为列设置别名。

别名列是通过在值前面加上前缀来执行的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 
于 2017-07-02T15:33:34.780 回答