Skip to content

Commit

Permalink
Added stream id
Browse files Browse the repository at this point in the history
  • Loading branch information
JumboDVDH0 committed Apr 24, 2024
1 parent e9f37e6 commit aaf9563
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions models/staging/stg_ga4__client_key_first_last_pageviews.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit aaf9563

Please sign in to comment.