Function max()
finds and returns the maximum value of a data column. Only one row from the data stream will be kept after this function is called, and all the rest rows will be abandoned.
Arguments:
- Number, string or time <number | string | datetime | timestamp>, auto-abstraction: UUID of NODE/EDGE, row index (starting from 0) of PATH/TABLE, or the first element of ARRAY
Returns:
- Max value <number | string | datetime | timestamp>
ATTR (Numeric value)
Example: find the outbound 1-step paths from Card CA001, find the biggest amount of money transferred
n({_id == "CA001"}).re({@transfer} as pay).n({@card})
return max(pay.amount)
ATTR (String)
Example: find the outbound 1-step paths from Card CA001, find the biggest payee cards' ID
n({_id == "CA001"}).re({@transfer}).n({@card} as payee)
return max(payee._id)
ATTR (time)
Example: find the outbound 1-step paths from Card CA001, find the minimum value of transfer time
n({_id == "CA001"}).re({@transfer} as pay).n({@card})
return max(pay.time)