The aggregate functions for temporal cells are illustrated next.
Temporal count
tCount(tcell) → {tintSeq,tintSeqSet}
SELECT tCount(temp) FROM (VALUES (th3index '831c02fffffffff@2001-01-01')) AS t(temp);
-- {1@2001-01-01}
SELECT tCount(temp) FROM (VALUES (tquadbin '48a6227affffffff@2001-01-01')) AS t(temp);
-- {1@2001-01-01}
SELECT tCount(temp) FROM (VALUES (ts2cell '47c3c@2001-01-01')) AS t(temp);
-- {1@2001-01-01}
Window count
wCount(tcell) → {tintSeq,tintSeqSet}
SELECT wCount(temp, interval '1 day') FROM (VALUES
(th3index '831c02fffffffff@2001-01-01')) AS t(temp);
-- {[1@2001-01-01, 1@2001-01-02]}
SELECT wCount(temp, interval '1 day') FROM (VALUES
(tquadbin '48a6227affffffff@2001-01-01')) AS t(temp);
-- {[1@2001-01-01, 1@2001-01-02]}
SELECT wCount(temp, interval '1 day') FROM (VALUES
(ts2cell '47c3c@2001-01-01')) AS t(temp);
-- {[1@2001-01-01, 1@2001-01-02]}
Aggregate a set of temporal cells by merging them, or by assembling them into a sequence or a sequence set
mergeAgg(tcell) → tcell appendInstantAgg(tcell,interp text='step',maxt interval) → tcell appendSequenceAgg(tcell) → tcell
Each carries a bare spelling kept for PostgreSQL backward compatibility.
SELECT mergeAgg(temp) FROM (VALUES (th3index '831c02fffffffff@2001-01-01')) AS t(temp);
-- {831c02fffffffff@2001-01-01}
SELECT mergeAgg(temp) FROM (VALUES (tquadbin '48a6227affffffff@2001-01-01')) AS t(temp);
-- {48a6227affffffff@2001-01-01}
SELECT mergeAgg(temp) FROM (VALUES (ts2cell '47c3c@2001-01-01')) AS t(temp);
-- {47c3c@2001-01-01}