Last active
December 31, 2019 05:34
-
-
Save voycey/657f852431d377dd2cba9e6ccf428ada to your computer and use it in GitHub Desktop.
SQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT m.id, d.name, d.brand, d.wkt from dealerships d | |
LEFT JOIN movement m ON ST_CONTAINS(d.wkt, ST_POINT(m.lng, m.lat)) | |
WHERE d.brand IN ('AUDI', 'BMW') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment