Reference
| Fluent API method | FQL function | Description |
|---|---|---|
ceil($field) | CEIL(field) | Round a number up to the nearest integer |
floor($field) | FLOOR(field) | Round a number down to the nearest integer |
round($field, $decimals) | ROUND(field, decimals) | Round a number to the given decimal places |
modulo($field, $divisor) | MOD(field, divisor) | Return the remainder of a division |
add(...$operands) | ADD(...) | Add two or more numbers or fields |
subtract(...$operands) | SUB(...) | Subtract operands from the first value |
multiply(...$operands) | MULTIPLY(...) | Multiply two or more numbers or fields |
divide(...$operands) | DIVIDE(...) | Divide the first value by subsequent operands |
Examples
Variadic arithmetic functions
ADD, SUB, MULTIPLY, and DIVIDE accept a variable number of arguments. Each argument can be either a field name or a literal number. Field names are resolved against the current row; unresolved names fall back to being treated as literal values.
For
SUB and DIVIDE, the first operand is the initial value. Subsequent operands are subtracted from or divided into it in order.