sql/queries/endpoints.sql
LOAD spatial;
-- Declared HF endpoints with their frequency and source dates.
SELECT
r.source_issue,
r.terrakey,
r.adm,
r.frequency_mhz,
r.bandwidth_khz,
r.emi_cls,
r.received_date,
r.publication_date,
e.relationship,
e.role,
e.site_name,
e.country,
e.geo_type,
e.latitude,
e.longitude,
e.radius_km,
e.zone_id,
e.geom
FROM hf_records AS r
JOIN hf_endpoints AS e USING (source_issue, terrakey)
ORDER BY r.received_date DESC NULLS LAST, r.source_issue DESC,
r.terrakey, e.relationship, e.geo_key, e.geo_pt;