Addressed comments
This commit is contained in:
parent
83dd419e19
commit
6287b57171
6 changed files with 12 additions and 10 deletions
|
|
@ -14,10 +14,11 @@
|
|||
-- Metrics --
|
||||
count(distinct aos.id_accommodation) as accommodation_with_offered_service_count
|
||||
from {{ ref("int_kpis__dimension_dates") }} d
|
||||
inner join
|
||||
left join
|
||||
{{ ref("int_kpis__metric_daily_new_dash_accommodation_offered_services") }}
|
||||
as aos
|
||||
on d.date = aos.date
|
||||
where aos.id_accommodation is not null
|
||||
group by 1, 2, 3
|
||||
{% if not loop.last %}
|
||||
union all
|
||||
|
|
|
|||
|
|
@ -12,9 +12,10 @@
|
|||
-- Metrics --
|
||||
count(distinct dos.id_deal) as deal_with_offered_service_count
|
||||
from {{ ref("int_kpis__dimension_dates") }} d
|
||||
inner join
|
||||
left join
|
||||
{{ ref("int_kpis__metric_daily_new_dash_deals_offered_services") }} as dos
|
||||
on d.date = dos.date
|
||||
where dos.id_deal is not null
|
||||
group by 1, 2, 3
|
||||
{% if not loop.last %}
|
||||
union all
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@
|
|||
-- Metrics --
|
||||
count(distinct aos.id_accommodation) as accommodation_with_offered_service_count
|
||||
from {{ ref("int_kpis__dimension_dates") }} d
|
||||
inner join
|
||||
left join
|
||||
{{ ref("int_kpis__metric_daily_new_dash_accommodation_offered_services") }}
|
||||
as aos
|
||||
on aos.date = d.date
|
||||
where d.is_end_of_month = true
|
||||
where d.is_end_of_month = true and aos.id_accommodation is not null
|
||||
group by 1, 2, 3
|
||||
{% if not loop.last %}
|
||||
union all
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@
|
|||
-- Metrics --
|
||||
count(distinct dos.id_deal) as deal_with_offered_service_count
|
||||
from {{ ref("int_kpis__dimension_dates") }} d
|
||||
inner join
|
||||
left join
|
||||
{{ ref("int_kpis__metric_daily_new_dash_deals_offered_services") }} as dos
|
||||
on dos.date = d.date
|
||||
where d.is_end_of_month = true
|
||||
where d.is_end_of_month = true and dos.id_deal is not null
|
||||
group by 1, 2, 3
|
||||
{% if not loop.last %}
|
||||
union all
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@
|
|||
-- Metrics --
|
||||
count(distinct aos.id_accommodation) as accommodation_with_offered_service_count
|
||||
from {{ ref("int_kpis__dimension_dates") }} d
|
||||
inner join
|
||||
left join
|
||||
{{ ref("int_kpis__metric_daily_new_dash_accommodation_offered_services") }}
|
||||
as aos
|
||||
on aos.date = d.date
|
||||
where d.is_end_of_week = true
|
||||
where d.is_end_of_week = true and aos.id_accommodation is not null
|
||||
group by 1, 2, 3
|
||||
{% if not loop.last %}
|
||||
union all
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@
|
|||
-- Metrics --
|
||||
count(distinct dos.id_deal) as deal_with_offered_service_count
|
||||
from {{ ref("int_kpis__dimension_dates") }} d
|
||||
inner join
|
||||
left join
|
||||
{{ ref("int_kpis__metric_daily_new_dash_deals_offered_services") }} as dos
|
||||
on dos.date = d.date
|
||||
where d.is_end_of_week = true
|
||||
where d.is_end_of_week = true and dos.id_deal is not null
|
||||
group by 1, 2, 3
|
||||
{% if not loop.last %}
|
||||
union all
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue