I have a 'cities' point layer. I want to compute a table with the coordinates of the geometries which works fine with that expression:
select
name,
ST_X(geom) as x_coordinate,
ST_Y(geom) as y_coordinate
from
cities
Now I want to round the values because there are many digits after the comma. I only want to have 2 digits after the comma. Why does the following expression doesn't work for me?
select
name,
round(ST_X(geom),2) as x_coordinate,
round(ST_Y(geom),2) as y_coordinate
from
cities
The error message I get is:
ERROR: function round(double precision, integer) does not exist