This content applies to a previous version of CARTO
In October 2021 we released a new version of our platform. You can find the latest documentation at docs.carto.com
Back to Help Center
How to Round Decimal Values in Builder
Learn how to round numeric columns in Builder with SQL.
Solution
To round a numeric value or column to a certain number of decimal places, apply a SQL query using PostgreSQL’s round function:
SELECT
*,
round(column::numeric, 2) as round_column
FROM
tablename
This approach converts the column to a numeric type and rounds it to the specified number of decimal places (in this example, 2 decimal places).
