-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5eaf3e9
commit d8d54bd
Showing
6 changed files
with
176 additions
and
570 deletions.
There are no files selected for viewing
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
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
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
13 changes: 7 additions & 6 deletions
13
datascience/src/pipeline/queries/monitorfish/last_positions.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
SELECT | ||
SELECT DISTINCT ON (cfr) | ||
cfr, | ||
latitude, | ||
longitude, | ||
ST_SetSRId(ST_MakePoint(longitude, latitude), 4326) AS geometry | ||
FROM last_positions | ||
WHERE cfr IS NOT NULL | ||
f.facade | ||
FROM last_positions p | ||
LEFT JOIN facade_areas_subdivided f | ||
ON ST_Intersects(ST_SetSRId(ST_MakePoint(p.longitude, p.latitude), 4326), f.geometry) | ||
WHERE cfr IS NOT NULL | ||
ORDER BY cfr, last_position_datetime_utc DESC |
Oops, something went wrong.