You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT
start_month,
end_month,
array_agg(segment_category, 'STRING', true) AS segment_category,
distinctcount(segment_category) AS distinctcount
FROM metrics_table
WHERE subset_name = 'All Data'
AND start_month = '2024-01-01'
AND end_month = '2024-09-01'
GROUP BY 1, 2
UNION ALL
SELECT
'no group by' AS start_month,
'no group by' AS end_month,
array_agg(segment_category, 'STRING', true) AS segment_category,
distinctcount(segment_category) AS distinctcount
FROM metrics_table
WHERE subset_name = 'All Data'
AND start_month = '2024-01-01'
AND end_month = '2024-09-01'
This is a simplified version of a user query
What we see here is
without the group by, we still get the right distinct count, but one of the groups is missing in array_agg. This happens consistently.
The text was updated successfully, but these errors were encountered: