Merged PR 4400: Adds Billable Bookings split per scope
# Description Changes: * Adds Business Scope split on Billable Bookings + propagates towards Agg/Metric Monthly/MTD models This is a temporary modification until the ticket on Billable Bookings for New Dash is handled. # Checklist - [X] The edited models and dependants run properly with production data. - [X] The edited models are sufficiently documented. - [X] The edited models contain PK tests, and I've ran and passed them. - [ ] I have checked for DRY opportunities with other models and docs. - [ ] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. Related work items: #27356
This commit is contained in:
parent
4b94d5f70b
commit
a690ca6eac
5 changed files with 79 additions and 9 deletions
|
|
@ -5,6 +5,7 @@
|
|||
"end_date",
|
||||
"id_deal",
|
||||
"active_accommodations_per_deal_segmentation",
|
||||
"business_scope",
|
||||
],
|
||||
)
|
||||
}}
|
||||
|
|
@ -14,6 +15,7 @@ select
|
|||
d.first_day_month as start_date,
|
||||
d.date as end_date,
|
||||
b.id_deal,
|
||||
b.business_scope,
|
||||
b.active_accommodations_per_deal_segmentation,
|
||||
-- Dimensions --
|
||||
b.main_billing_country_iso_3_per_deal,
|
||||
|
|
@ -25,4 +27,4 @@ left join
|
|||
on date_trunc('month', b.date)::date = d.first_day_month
|
||||
and extract(day from b.date) <= d.day
|
||||
where d.is_month_to_date = true and b.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