返回指定行中特定列的值。Returns the value of a specific column in a specified row. 指定的行与序列化行集中的当前行存在指定的偏移量。The specified row is at a specified offset from the current row in a serialized row set.


有几种可能性。There are several possibilities.

  • prev(column)

  • prev(column, offset)

  • prev(column, offset, default_value)


  • column:要从中获取值的列。column: The column to get the values from.

  • offset:行中向后的偏移量。offset: The offset to go back in rows. 如果未指定偏移量,则使用默认偏移量 1。When no offset is specified, a default offset 1 is used.

  • default_value:在没有要从中获取值的前面行时使用的默认值。default_value: The default value to be used when there are no previous rows to take the value from. 如果未指定默认值,则使用 null。When no default value is specified, null is used.


Table | serialize | extend prevA = prev(A,1)
| extend diff = A - prevA
| where diff > 1

Table | serialize prevA = prev(A,1,10)
| extend diff = A - prevA
| where diff <= 10