将值向下舍入为固定大小的“bin”,并由查询属性提供对 bin 大小和起点的控制。Rounds values down to a fixed-size "bin", with control over the bin size and starting point provided by a query property.


bin_auto ( Expression )bin_auto ( Expression )


  • 表达式 :数值类型的标量表达式,指示要舍入的值。Expression : A scalar expression of a numeric type indicating the value to round.

客户端请求属性Client Request Properties

  • query_bin_auto_size:指示每个 bin 大小的数值文本。query_bin_auto_size: A numeric literal indicating the size of each bin.
  • query_bin_auto_at:指示 Expression 的一个值的数值文本,是一个“固定点”(即,bin_auto(fixed_point) == fixed_point 的值 fixed_pointquery_bin_auto_at: A numeric literal indicating one value of Expression which is a "fixed point" (that is, a value fixed_point for which bin_auto(fixed_point) == fixed_point.)


Expression 下 query_bin_auto_at 最接近的倍数已移位,因此 query_bin_auto_at 将被转换为自身。The nearest multiple of query_bin_auto_at below Expression , shifted so that query_bin_auto_at will be translated into itself.


set query_bin_auto_size=1h;
set query_bin_auto_at=datetime(2017-01-01 00:05);
range Timestamp from datetime(2017-01-01 00:05) to datetime(2017-01-01 02:00) step 1m
| summarize count() by bin_auto(Timestamp)
TimestampTimestamp count_count_
2017-01-01 00:05:00.00000002017-01-01 00:05:00.0000000 6060
2017-01-01 01:05:00.00000002017-01-01 01:05:00.0000000 5656