arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

round

This section contains reference documentation for the round function.

Round the given time value to nearest bucket start value.

hashtag
Signature

round(timeValue, bucketSize)

hashtag
Usage Examples

Round seconds epoch value to the start value of the 30 seconds bucket to which it belongs.

rounded

Round milliseconds epoch value to the start value of the 5,000 milliseconds bucket to which it belongs.

rounded
select round(1639144274, 30) AS rounded
FROM ignoreMe

1639144260

select round(1639144274000, 5000) AS rounded
FROM ignoreMe

1639144270000