
Example:
dbadmin=> SELECT ROUND(12345.678901726198736271, 2) AS c_rounded;
c_rounded
--------------------------
12345.680000000000000000
(1 row)
If you’d prefer not to retain the original scale and have the scale of the result be a specific number of decimal places, then explicitly cast the expression to a NUMERIC instead.
dbadmin=> SELECT 12345.678901726198736271::NUMERIC(25, 2) AS c_rounded;
c_rounded
-----------
12345.68
(1 row)
Helpful Links:https://www.vertica.com/docs/latest/HTML/Content/Authoring/SQLReferenceManual/Functions/Mathematical/ROUND.htm
https://www.vertica.com/docs/latest/HTML/Content/Authoring/SQLReferenceManual/DataTypes/Numeric/NUMERIC.htm
Have fun!