monthly and weekly metric models
This commit is contained in:
parent
8c23f91242
commit
cf553cfcb1
4 changed files with 185 additions and 4 deletions
|
|
@ -4,6 +4,7 @@
|
|||
unique_key=[
|
||||
"end_date",
|
||||
"id_deal",
|
||||
"has_id_check",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
gp.id_deal,
|
||||
gp.has_id_check,
|
||||
gp.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
gp.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -27,4 +29,4 @@ left join
|
|||
{{ ref("int_kpis__metric_daily_guest_payments") }} gp
|
||||
on date_trunc('month', gp.date)::date = d.first_day_month
|
||||
where d.is_end_of_month = true and gp.id_deal is not null
|
||||
group by 1, 2, 3, 4, 5
|
||||
group by 1, 2, 3, 4, 5, 6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue