Skip to content

Instantly share code, notes, and snippets.

@aleszu
Created October 5, 2015 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aleszu/b618cf58432253ac7447 to your computer and use it in GitHub Desktop.
Save aleszu/b618cf58432253ac7447 to your computer and use it in GitHub Desktop.
SELECT
t.the_geom_webmercator,
t.altitude,
t.date_time,
t.device_info_serial,
t.direction,
t.latitude,
t.longitude,
|/(t.x_speed^2 + t.y_speed^2) AS speed_2d,
d.bird_name
FROM bird_tracking t
LEFT JOIN bird_tracking_devices d
ON t.device_info_serial = d.device_info_serial
WHERE
t.userflag IS FALSE
AND t.date_time >= '2013-08-15'
AND t.date_time < '2014-05-01'
AND d.bird_name IN (
'Eric',
'Nico',
'Sanne'
)
ORDER BY
d.bird_name,
t.date_time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment