Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ae9b41 commit 540efbdCopy full SHA for 540efbd
coderd/database/queries/insights.sql
@@ -94,10 +94,10 @@ WITH d AS (
94
GROUP BY ts.from_, ts.to_, was.user_id
95
), template_ids AS (
96
SELECT
97
- from_,
+ template_usage_by_day.from_,
98
array_agg(DISTINCT id) AS ids
99
FROM (
100
- SELECT from_, unnest(ids) AS id
+ SELECT template_usage_by_day_unnested.from_, unnest(ids) AS id
101
102
SELECT DISTINCT
103
from_,
@@ -107,7 +107,7 @@ WITH d AS (
107
GROUP BY from_, template_ids
108
) AS template_usage_by_day_unnested
109
) AS template_usage_by_day
110
- GROUP BY from_
+ GROUP BY template_usage_by_day.from_
111
)
112
113
0 commit comments