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)
According to Bryan's response you can do this to limit decimals in a query. I convert from km/h to m/s and display it in dygraphs but when I did it in dygraphs it looked weird. Looks fine when doing the calculation in the query instead. This is on postgresql 9.5.1.
select date,(wind_speed/3.6)::numeric(7,1) from readings;