-
-
Save ldenson11/be1e7b2e1e7e96f32394b965d6a5b8d8 to your computer and use it in GitHub Desktop.
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
-- find aircraft that have been flagged for further scrutiny | |
SELECT a.icao, a.lat, a.lon, a.type_aircraft, a.type_registrant | |
FROM airplanes a, -- virtual table for aircraft ADS-B cluster | |
airplanes_alert_notifications b -- virtual table for notifications cluster | |
WHERE a.icao = b.icao | |
AND a.eventTimestamp -- kafka timestamp | |
BETWEEN current_timestamp - INTERVAL '5' HOUR | |
AND current_timestamp -- last 5 hours of data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment