A continuación se ilustran las funciones de agregación para celdas temporales.
Conteo temporal
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}
Conteo de ventana
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]}
Agregar un conjunto de celdas temporales fusionándolas, o ensamblándolas en una secuencia o en un conjunto de secuencias
merge(tcell) → tcell appendInstant(tcell[,interp text[,maxt interval]]) → tcell appendSequence(tcell) → tcell
DuckDB, Apache Spark y Apache Flink las llaman mergeAgg, appendInstantAgg y appendSequenceAgg (“Los nombres que poseen los motores”).
SELECT merge(temp) FROM (VALUES (th3index '831c02fffffffff@2001-01-01')) AS t(temp);
-- {831c02fffffffff@2001-01-01}
SELECT merge(temp) FROM (VALUES (tquadbin '48a6227affffffff@2001-01-01')) AS t(temp);
-- {48a6227affffffff@2001-01-01}
SELECT merge(temp) FROM (VALUES (ts2cell '47c3c@2001-01-01')) AS t(temp);
-- {47c3c@2001-01-01}