Skip to content

Instantly share code, notes, and snippets.

View gitirx's full-sized avatar

gitirx

  • Joined May 16, 2026
View GitHub Profile
with clean_ads as (
select
*,
row_number() over (partition by ad_id, date order by timestamp desc) as row_id
from `neksu-496015.homework.marketing_data_session`
),
monthly_metrics as (
select
date_trunc(date, month) as campaign_month,
with clean_ads as (
select
*,
row_number() over (partition by ad_id, date order by timestamp desc) as row_id
from `neksu-496015.homework.marketing_data_session`
),
max_metrics as (
select
source,