round

Full name: taxi.stdlib.round

Signature

declare extension function round(value: Decimal, precision: Int = 0): Decimal

Description

Rounds a decimal value to the specified number of decimal places.

precision defaults to 0 (round to nearest integer).

find { measurement: Measurement } as {
   rounded: Decimal = measurement.value.round(2)
}

Examples

Rounds a decimal to the specified number of decimal places.

Try it out

Schema
Query Plan
Play with this snippet by editing it here, or edit it on Taxi Playground
Result
Query failed
Next
Welcome to Taxi