# ROUND_TO

The ROUND_TO function rounds a numeric value down to one of a list of fixed points.

## Syntax

ROUND_TO(field, points)

### Parameters

#### field

The numeric value to round. If `null`, the function returns `null`.

#### points

Remaining rounding points. Must be constants.

## Examples

Group employees by birth date windows, rounding each birth date down to the nearest specified date:

```esql
FROM employees
| STATS COUNT(*) BY birth_window=ROUND_TO(
    birth_date,
    "1900-01-01T00:00:00Z"::DATETIME,
    "1950-01-01T00:00:00Z"::DATETIME,
    "1955-01-01T00:00:00Z"::DATETIME,
    "1960-01-01T00:00:00Z"::DATETIME,
    "1965-01-01T00:00:00Z"::DATETIME,
    "1970-01-01T00:00:00Z"::DATETIME,
    "1975-01-01T00:00:00Z"::DATETIME
)
| SORT birth_window ASC
```