Skip to content

Commit 74f7597

Browse files
committed
Fixes
1 parent 7109d92 commit 74f7597

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

coderd/database/queries.sql.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/insights.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ WITH app_stats AS (
6464
FROM workspace_agent_stats was
6565
WHERE
6666
was.created_at >= @start_time::timestamptz
67-
AND was.created_at @end_time::timestamptz
67+
AND was.created_at < @end_time::timestamptz
6868
AND was.connection_count > 0
69-
AND CASE WHEN COALESCE(array_length(@template_ids::uuid[], 1), 0) > 0 THEN w.template_id = ANY(@template_ids::uuid[]) ELSE TRUE END
69+
AND CASE WHEN COALESCE(array_length(@template_ids::uuid[], 1), 0) > 0 THEN was.template_id = ANY(@template_ids::uuid[]) ELSE TRUE END
7070
GROUP BY date_trunc('minute', was.created_at), was.user_id, was.template_id
7171
), combined_stats AS (
7272
SELECT

0 commit comments

Comments
 (0)