Skip to content

Commit

Permalink
chore: read from v3 tables
Browse files Browse the repository at this point in the history
  • Loading branch information
chronark committed Jan 29, 2025
1 parent 0f24b5f commit daccfcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/clickhouse/src/active_keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function getActiveKeysPerHour(ch: Querier) {
query: `
SELECT count(DISTINCT key_id) as keys,
time
FROM verifications.key_verifications_per_hour_v1
FROM verifications.key_verifications_per_hour_v3
WHERE workspace_id = {workspaceId: String}
AND key_space_id = {keySpaceId: String}
AND time < fromUnixTimestamp64Milli({end: Int64})
Expand Down Expand Up @@ -53,7 +53,7 @@ export function getActiveKeysPerDay(ch: Querier) {
SELECT
count(DISTINCT key_id) as keys,
time,
FROM verifications.key_verifications_per_day_v1
FROM verifications.key_verifications_per_day_v3
WHERE
workspace_id = {workspaceId: String}
AND key_space_id = {keySpaceId: String}
Expand Down Expand Up @@ -93,7 +93,7 @@ export function getActiveKeysPerMonth(ch: Querier) {
SELECT
count(DISTINCT key_id) as keys,
time,
FROM verifications.key_verifications_per_month_v1
FROM verifications.key_verifications_per_month_v3
WHERE
workspace_id = {workspaceId: String}
AND key_space_id = {keySpaceId: String}
Expand Down

0 comments on commit daccfcd

Please sign in to comment.