Only this week, get the SQL Complete Track of 9 courses in a special prize of $330 $89!
So you think you can count
Round and other functions
17. Round in Postgres – explanation
Revision and practice


In Postgres, to round a floating point number and specify a precision at the same time, you have to first cast it numeric. For example:

SELECT round(CAST(weight AS numeric),2)
FROM character;

will round the weight to two decimal places.


Round height to 2 decimal places.

Stuck? Here's a hint!

Here, you'll need round(CAST(height AS numeric),2).