umami: View umami submit events from 2025-09-01
To see more submits in our dashboard
This commit is contained in:
@@ -50,7 +50,7 @@ create view weekly_sim_submit_count as
|
|||||||
events.group = group_and_sims.group
|
events.group = group_and_sims.group
|
||||||
and events.sim_type = group_and_sims.sim_type
|
and events.sim_type = group_and_sims.sim_type
|
||||||
-- NOTE(simkir): Filter here in the join to, again, allow missing rows
|
-- NOTE(simkir): Filter here in the join to, again, allow missing rows
|
||||||
and events.created_at between current_timestamp - '7 days'::interval and current_timestamp
|
and events.created_at between '2025-09-01' and current_timestamp
|
||||||
group by
|
group by
|
||||||
group_and_sims.group,
|
group_and_sims.group,
|
||||||
group_and_sims.sim_type
|
group_and_sims.sim_type
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
-- standalone query for create-sim-count-view.sql view query
|
||||||
|
with
|
||||||
|
group_and_sims as (
|
||||||
|
select
|
||||||
|
"group",
|
||||||
|
sim_type
|
||||||
|
from
|
||||||
|
(
|
||||||
|
select substring(distinct_id similar '%#"@%#"' escape '#') as group
|
||||||
|
from session
|
||||||
|
where distinct_id is not null and distinct_id like '%@%'
|
||||||
|
group by substring(distinct_id similar '%#"@%#"' escape '#')
|
||||||
|
)
|
||||||
|
cross join
|
||||||
|
(
|
||||||
|
select distinct string_value as sim_type
|
||||||
|
from event_data
|
||||||
|
where event_data.data_key = 'kind'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
events as (
|
||||||
|
select
|
||||||
|
substring(session.distinct_id similar '%#"@%#"' escape '#') as group,
|
||||||
|
event_data.string_value as sim_type,
|
||||||
|
event_data.website_event_id as event_id,
|
||||||
|
event_data.created_at
|
||||||
|
from
|
||||||
|
website_event
|
||||||
|
JOIN session ON session.session_id = website_event.session_id
|
||||||
|
LEFT OUTER JOIN event_data ON event_data.website_event_id = website_event.event_id
|
||||||
|
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 event_data.data_key = 'kind'
|
||||||
|
)
|
||||||
|
|
||||||
|
select
|
||||||
|
group_and_sims.group,
|
||||||
|
group_and_sims.sim_type,
|
||||||
|
count(events.event_id)
|
||||||
|
from
|
||||||
|
group_and_sims
|
||||||
|
left outer join events on
|
||||||
|
events.group = group_and_sims.group
|
||||||
|
and events.sim_type = group_and_sims.sim_type
|
||||||
|
and events.created_at between '2025-09-01' and current_timestamp
|
||||||
|
group by
|
||||||
|
group_and_sims.group,
|
||||||
|
group_and_sims.sim_type
|
||||||
Reference in New Issue
Block a user