How do i create a linestring from points sort by date in PostgreSQL?
SELECT observations.id, ST_MakeLine(observations.geom ORDER BY observations.date) AS newgeom FROM observations GROUP BY observations.id;
This is going wrong. It returns me a linestring with same coordinates. So, instead of a line from a to b, it gives me a to a.
What am I doing wrong?