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

标签 azure azure-data-explorer

我在 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/

相关文章:

azure-data-explorer - Kusto !has_any |其中 value 在 set 中不包含任何值

azure - ADX 项目列包含包含空白的新列

python - 是否可以使用动态数组/列表作为参数化 kusto 查询的输入?

azure - JWT验证: Caching JWKS derived from cached discovery document via Azure API Management

c# - 使用 azure b2c 跳过密码重置时的电子邮件验证步骤

通过应用程序的 Azure block blob 过期

azure - 回复地址 'https://...' 与为应用程序配置的回复地址不匹配,即使该地址存在

c# - 将 Kusto 客户端响应转换为对象列表会返回空对象

azure - 来自 C# 的 Kusto 查询

azure - azure 表中的逻辑表设计