Fix umami drifter count queries

Have to fill in all possible groups and sim types before doing the
transpose to get the right table.
This commit is contained in:
2025-11-18 18:15:31 +01:00
parent 74600abddc
commit 9720de1a67
4 changed files with 102 additions and 17 deletions
@@ -10,9 +10,9 @@ WHERE
website_event.website_id = '16e7d807-4db5-45fd-92a9-27393445a153'
AND website_event.event_type = 2
AND website_event.event_name = 'mapster-submit-drifters'
AND website_event.created_at BETWEEN CURRENT_TIMESTAMP - '7 days'::interval AND CURRENT_TIMESTAMP
AND session.distinct_id IS NOT NULL
AND event_data.data_key = 'kind'
AND event_data.created_at BETWEEN CURRENT_TIMESTAMP - '7 days'::interval AND CURRENT_TIMESTAMP
GROUP BY
substring(session.distinct_id SIMILAR '%#"@%#"' ESCAPE '#'),
event_data.string_value;