Function min()
finds and returns the minimum 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:
- Min value <number | string | datetime | timestamp>
ATTR (Numeric value)
Example: find the outbound 1-step paths from Card CA001, then find the smallest amount of money transferred
n({_id == "CA001"}).re({@transfer} as pay).n({@card})
return min(pay.amount)
ATTR (String)
Example: find the outbound 1-step paths from Card CA001, then find the smallest payee cards' ID
n({_id == "CA001"}).re({@transfer}).n({@card} as payee)
return min(payee._id)
ATTR (time)
Example: find the outbound 1-step paths from Card CA001, then find the minimum time value of the transfers
n({_id == "CA001"}).re({@transfer} as pay).n({@card})
return min(pay.time)