Skip to content

Commit

Permalink
feat: create utils queries
Browse files Browse the repository at this point in the history
  • Loading branch information
d116626 committed Jun 18, 2024
1 parent 0f4efd2 commit 3e70145
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion queries/models/utils/monitored_plates.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tb AS (
t1.camera_numero,
t1.empresa,
COALESCE(t2.latitude, t1.camera_latitude) AS latitude,
COALESCE(t2.longitude, t1.camera_longitude) AS latitude,
COALESCE(t2.longitude, t1.camera_longitude) AS longitude,
DATETIME(t1.datahora_captura, 'America/Sao_Paulo') AS datahora_captura,
FROM `rj-cetrio.ocr_radar.readings_*` t1
JOIN loc t2
Expand Down
2 changes: 1 addition & 1 deletion queries/models/utils/radar_table_with_locs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tb AS (
t1.camera_numero,
t1.empresa,
COALESCE(t2.latitude, t1.camera_latitude) AS latitude,
COALESCE(t2.longitude, t1.camera_longitude) AS latitude,
COALESCE(t2.longitude, t1.camera_longitude) AS longitude,
DATETIME(t1.datahora_captura, 'America/Sao_Paulo') AS datahora_captura,
FROM `rj-cetrio.ocr_radar.readings_*` t1
JOIN loc t2
Expand Down

0 comments on commit 3e70145

Please sign in to comment.