VERSION 3
NODE aggregate
SQL >

    SELECT
        workspaceId,
        apiId,
        keyId,
        toStartOfHour(fromUnixTimestamp64Milli(time)) AS time
    FROM key_verifications__v2
    GROUP BY
        workspaceId,
        apiId,
        keyId,
        time

TYPE materialized
DATASOURCE mv_billing_hourly_active_keys__v2
