Skip to content

Commit

Permalink
Use LEFT JOIN to include NULL values (#961)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-soltesz authored Dec 1, 2022
1 parent 8f30e30 commit 7dbd459
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/federation/bigquery/bq_annotation.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@

WITH recent_ndt_tcpinfo AS (
SELECT "ndt/tcpinfo" AS datatype, client.Geo.Latitude, client.Geo.Longitude, systems.ASNs AS asn
FROM `measurement-lab.ndt.tcpinfo`, UNNEST(client.Network.Systems) AS systems
FROM `measurement-lab.ndt.tcpinfo` LEFT JOIN UNNEST(client.Network.Systems) AS systems
WHERE date = DATE_SUB(CURRENT_DATE(), INTERVAL 2 DAY)
), recent_ndt_ndt7 AS (
SELECT "ndt/ndt7" AS datatype, client.Geo.Latitude, client.Geo.Longitude, systems.ASNs AS asn
FROM `measurement-lab.ndt.ndt7`, UNNEST(client.Network.Systems) AS systems
FROM `measurement-lab.ndt.ndt7` LEFT JOIN UNNEST(client.Network.Systems) AS systems
WHERE date = DATE_SUB(CURRENT_DATE(), INTERVAL 2 DAY)
), recent_ndt_ndt5 AS (
SELECT "ndt/ndt5" AS datatype, client.Geo.Latitude, client.Geo.Longitude, systems.ASNs AS asn
FROM `measurement-lab.ndt.ndt5`, UNNEST(client.Network.Systems) AS systems
FROM `measurement-lab.ndt.ndt5` LEFT JOIN UNNEST(client.Network.Systems) AS systems
WHERE date = DATE_SUB(CURRENT_DATE(), INTERVAL 2 DAY)
), recent_ndt_scamper1 AS (
SELECT "ndt/scamper1" AS datatype, client.Geo.Latitude, client.Geo.Longitude, systems.ASNs AS asn
FROM `measurement-lab.ndt.scamper1`, UNNEST(client.Network.Systems) AS systems
FROM `measurement-lab.ndt.scamper1` LEFT JOIN UNNEST(client.Network.Systems) AS systems
WHERE date = DATE_SUB(CURRENT_DATE(), INTERVAL 2 DAY)
)

Expand Down

0 comments on commit 7dbd459

Please sign in to comment.