Skip to content

Instantly share code, notes, and snippets.

@matallo
Created April 12, 2016 20:00
Show Gist options
  • Save matallo/363b34f4285576e7838eead18d316d1e to your computer and use it in GitHub Desktop.
Save matallo/363b34f4285576e7838eead18d316d1e to your computer and use it in GitHub Desktop.
SELECT (array_agg(adshex ORDER BY timestamp ASC))[1] AS adshex
, (array_agg(agency ORDER BY timestamp ASC))[1] AS agency
, (array_agg(type ORDER BY timestamp ASC))[1] AS type
, flight_id
, ST_MakeLine(the_geom) as the_geom
, min(timestamp) AS timestamp
FROM matallo.feds1_copy_1
GROUP BY flight_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment