<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt">I have a table with gps tracks stored as points, each point being one data record for every second.<br><br>I am trying to write a view which generates a polyline for each track.  I know I need to "select MakeLine(the_geom) from track_log" but the postgis documentation suggests "You might want to use a subselect to order points before
                    feeding them to this aggregate."<br><br>Does anyone have an example of how to do this, the postgres documentation doesn't show an example of using a subquery in the SELECT list portion of the query.<br><br>Curtis<br></div></body></html>