你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

count operator

Applies to: ✅Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

计算输入记录集中的记录数。

Syntax

T|count

Learn more about syntax conventions.

Parameters

Name 类型 Required Description
T string ✔️ 将对其记录进行计数的表格输入。

Returns

此函数返回包含单个记录且列类型为 long 的表。 The value of the only cell is the number of records in T.

Examples

The examples in this article use publicly available tables in the help cluster, such as the StormEvents table in the Samples database.

The examples in this article use publicly available tables, such as the Weather table in the Weather analytics sample gallery. 可能需要修改示例查询中的表名称以匹配工作区中的表。

将 count 运算符用于表名称(如 StormEvents)时,它将返回该表中的记录总数。

StormEvents | count

Output

Count
59066

有关 count() 聚合函数的信息,请参阅 count()(聚合函数)