I am using PostgreSQL via the Ruby gem \'sequel\'.
I\'m trying to round to two decimal places.
Here\'s my code:
SELECT ROUND(AVG(some_column)
you can use the function below
SELECT TRUNC(14.568,2);
the result will show :
14.56
you can also cast your variable to the desire type :
SELECT TRUNC(YOUR_VAR::numeric,2)