From aaf95635ffbd52d336e7b5ad4eec338392326bf2 Mon Sep 17 00:00:00 2001 From: JumboDVDH0 Date: Wed, 24 Apr 2024 13:00:34 +0200 Subject: [PATCH] Added stream id --- models/staging/stg_ga4__client_key_first_last_pageviews.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/staging/stg_ga4__client_key_first_last_pageviews.sql b/models/staging/stg_ga4__client_key_first_last_pageviews.sql index d46f1c5a..1a51d550 100644 --- a/models/staging/stg_ga4__client_key_first_last_pageviews.sql +++ b/models/staging/stg_ga4__client_key_first_last_pageviews.sql @@ -4,6 +4,7 @@ with page_views_first_last as ( select + stream_id, client_key, FIRST_VALUE(event_key) OVER (PARTITION BY client_key ORDER BY event_timestamp ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS first_page_view_event_key, LAST_VALUE(event_key) OVER (PARTITION BY client_key ORDER BY event_timestamp ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS last_page_view_event_key @@ -12,6 +13,7 @@ with page_views_first_last as ( ), page_views_by_client_key as ( select distinct + stream_id, client_key, first_page_view_event_key, last_page_view_event_key