[Mobilitydb-dev] [EXTERNAL] PostgreSQL Version Support in MobilityDB
Esteban Zimanyi
estebanzimanyi at gmail.com
Wed Jul 6 03:16:48 PDT 2022
After a suggestion from Maxime the first subquery can be expressed as
a temporal Boolean aggregation function
SELECT No, merge(array_agg(tintersects(atPeriod(flight, p), storm) ORDER BY 1))
FROM Storms S, Flights F GROUP BY No ORDER BY No;
no | merge
----+----------------------------------------------------------------------------------
1 | {[f at 2000-01-02 00:00:00+01, t at 2000-01-04 12:00:00+01,
t at 2000-01-05 00:00:00+01)}
(1 row)
SELECT No, tor(tintersects(atPeriod(flight, p), storm))
FROM Storms S, Flights F GROUP BY No ORDER BY No;
no | tor
----+----------------------------------------------------------------------------------
1 | {[f at 2000-01-02 00:00:00+01, t at 2000-01-04 12:00:00+01,
t at 2000-01-05 00:00:00+01)}
(1 row)
More information about the Mobilitydb-dev
mailing list