VERSION 1
TOKEN "endpoint_billing_get_active_keys_per_workspace_per_day__v1_endpoint_read_0857" READ

NODE get_usage
SQL >

    %
    SELECT count(DISTINCT keyId) as usage, time, workspaceId
    FROM mv_billing_hourly_active_keys__v2
    where time > now() - INTERVAL 32 DAY and time <= now()
    group by workspaceId, time
