The ST_LineStringAggr aggregate function can be used to build a linestring out of a group
of ordered points.
All of the geometry columns to be combined must have the same SRID.
All of the points to be combined must be non-empty with the same coordinate dimension.
Rows where the linestring-expression is NULL are not included.
Returns NULL for an empty group or a group containing no non-NULL values.
The resulting linestring has the same coordinate dimension as each point.
The ORDER BY clause should be specified to control the order of points within the
linestring. If not present, the order of points in the linestring will vary depending on the
access plan selected by the query optimizer.