# roundDecimal

Rounds the given value to a specified number of decimal places

## Signature

> roundDecimal(decimal\_value, decimal\_places)

## Usage Examples

```sql
SELECT roundDecimal(3.14159, 2);  -- Output: 3.14
SELECT roundDecimal(12.34567, 3); -- Output: 12.346
SELECT roundDecimal(9.8765, 0);   -- Output: 10
```

## **Important Considerations:**

* The `roundDecimal` function is particularly useful in financial calculations, scientific computations, or any scenario where precise control over decimal precision is required.
* Be aware of potential rounding errors that can accumulate in complex calculations involving many rounded values.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pinot.apache.org/release-1.3.0/configuration-reference/functions/round-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
