gpt4 book ai didi

azure - 如何在 Azure 中使用 Kusto 划分计数?

转载 作者:行者123 更新时间:2023-12-03 00:58:24 24 4
gpt4 key购买 nike

我在 Azure 中有一个日志查询,如下所示:

table
| where timestamp > ago(30min)
| count

我想要的是将计数除以一个数字,例如“5”。我尝试了下面的查询,但它引发了异常。我怎样才能用另一种方式做到这一点?

table
| where timestamp > ago(30min)
| count / 5

最佳答案

您必须先投影它,因为 count 是一个运算符,而不是像 count() 这样的普通数字或函数:

requests
| where timestamp > ago(30min)
| count
| project Count / 5

另一种方法是使用 count() 函数:

requests
| where timestamp > ago(30min)
| summarize count() / 5

关于azure - 如何在 Azure 中使用 Kusto 划分计数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64135169/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com