Parameters, Value
The standard deviation function calculates the standard deviation value of a column of data. It only keeps the data column as well as its homologous columns after aggregation, and it abandons other columns.
Syntax:
- Format: stddev(
<column>
) - Parameters: see table below
- Value: ATTR ( number )
Name | Category | Specification | Description |
---|---|---|---|
<column> |
NODE,EDGE,PATH,ATTR,ARRAY,TABLE | / | the column to be aggregated |
The value of <column>
with different categories in every row:
Type | Value |
---|---|
NODE | Node's UUID in the row |
EDGE | Edge's UUID in the row |
PATH | ROW INDEX(starts from 0)in the row |
ATTR | ATTR's value in the row |
ARRAY | The value of the 1st element in the array of the row |
TABLE | ROW INDEX(starts from 0)in the row |
ATTR (Numeric value)
Example: find the outbound 1-step paths from Card CA001, and calculate the standard deviation value of the amount of money transferred
n({_id == "CA001"}).re({@transfer} as pay).n({@card})
return stddev(pay.amount)