File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -93,17 +93,17 @@ WITH d AS (
93
93
)
94
94
GROUP BY ts .from_ , ts .to_ , was .user_id
95
95
), template_ids AS (
96
- SELECT
97
- template_usage_by_day .from_ ,
98
- array_agg(template_usage_by_day . template_id ) AS ids
99
- FROM (
100
- SELECT DISTINCT
101
- from_,
102
- template_id
103
- FROM usage_by_day, unnest(template_ids) template_id
104
- WHERE template_id IS NOT NULL
105
- ) AS template_usage_by_day
106
- GROUP BY template_usage_by_day .from_
96
+ SELECT
97
+ template_usage_by_day .from_ ,
98
+ array_agg(template_id) AS ids
99
+ FROM (
100
+ SELECT DISTINCT
101
+ from_,
102
+ unnest(template_ids) AS template_id
103
+ FROM usage_by_day
104
+ WHERE usage_by_day . template_ids IS NOT NULL
105
+ ) AS template_usage_by_day
106
+ GROUP BY template_usage_by_day .from_
107
107
)
108
108
109
109
SELECT
You can’t perform that action at this time.
0 commit comments