Window functions are used in $setWindowFields to return an aggregated value based on documents in a particular window.
Name | Description |
|---|---|
Returns an array of all unique values from a particular window. The order of the elements in the returned array is unspecified. | |
Returns the average of values from a particular window. | |
Returns the bottom element within a window according to the specified sort order. | |
Returns the bottom | |
Returns an array of the concatenated array values from documents in a window. | |
Returns the number of documents in a particular window. | |
Returns the value of an expression for the first document in a window. | |
Returns an array containing the first | |
Returns the value of an expression for the last document in a window. | |
Returns an array containing the last | |
Returns the maximum value from documents in a particular window. | |
Returns an array containing the maximum | |
Returns the median (50th percentile) value from documents in a specified window. You can use New in version 7.0. | |
Returns a document created by merging the input documents from a window. | |
Returns the minimum value from documents in a particular window. | |
Returns an array containing the | |
Returns an array of percentile values for the specified percentiles within a window. | |
Returns an array of all values, including duplicates, that result from applying an expression to each document in a window. | |
Returns an array of the unique elements in the array values in a window. New in version 8.1. | |
Returns the population standard deviation of values from documents in a particular window. | |
Returns the sample standard deviation of values in a window. | |
Returns the sum of numeric values from documents in a particular window. | |
Returns the top element within a window according to the specified sort order. | |
Returns the top |