postgresql - Order grouped rows before aggregate function -


I have located a Postgej table with Jyametry

points table:

  id | UID | Date | Geom  

points with the same uid with the same goal I'm trying to make Lainstring a full target UID by Group .

  SELECT uid, ST_MakeLine (geom) points group by UID  

This works, but I points to ensure that it is in the correct order I tried to do this by adding ORDER date before grouping.

  SELECT uid, Date from date ST_MakeLine (geom) & lt; - There is no way the group does not work Uaid error: "the Group" or to order the rows grouped before him syntax to feed the error  

What group work?

<

ORDER BY section can be placed at the end of the total argument .

  SELECT uid, ST_MakeLine (Jioaar order by date) points from Group UID  


Comments