hts/internal/tinybird/pipes/aggregate_last_used.pipe

16 lines
271 B
Plaintext

VERSION 1
NODE key_verifications_pipe_1411_0
SQL >
SELECT
keyId,
maxSimpleState(time) AS lastUsed
FROM key_verifications
GROUP BY keyId
TYPE materialized
DATASOURCE mv_keys_last_used
ENGINE "AggregatingMergeTree"
ENGINE_SORTING_KEY "keyId"