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 --
|
-- Metrics --
|
||||||
count(distinct aos.id_accommodation) as accommodation_with_offered_service_count
|
count(distinct aos.id_accommodation) as accommodation_with_offered_service_count
|
||||||
from {{ ref("int_kpis__dimension_dates") }} d
|
from {{ ref("int_kpis__dimension_dates") }} d
|
||||||
inner join
|
left join
|
||||||
{{ ref("int_kpis__metric_daily_new_dash_accommodation_offered_services") }}
|
{{ ref("int_kpis__metric_daily_new_dash_accommodation_offered_services") }}
|
||||||
as aos
|
as aos
|
||||||
on d.date = aos.date
|
on d.date = aos.date
|
||||||
|
where aos.id_accommodation is not null
|
||||||
group by 1, 2, 3
|
group by 1, 2, 3
|
||||||
{% if not loop.last %}
|
{% if not loop.last %}
|
||||||
union all
|
union all
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,10 @@
|
||||||
-- Metrics --
|
-- Metrics --
|
||||||
count(distinct dos.id_deal) as deal_with_offered_service_count
|
count(distinct dos.id_deal) as deal_with_offered_service_count
|
||||||
from {{ ref("int_kpis__dimension_dates") }} d
|
from {{ ref("int_kpis__dimension_dates") }} d
|
||||||
inner join
|
left join
|
||||||
{{ ref("int_kpis__metric_daily_new_dash_deals_offered_services") }} as dos
|
{{ ref("int_kpis__metric_daily_new_dash_deals_offered_services") }} as dos
|
||||||
on d.date = dos.date
|
on d.date = dos.date
|
||||||
|
where dos.id_deal is not null
|
||||||
group by 1, 2, 3
|
group by 1, 2, 3
|
||||||
{% if not loop.last %}
|
{% if not loop.last %}
|
||||||
union all
|
union all
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@
|
||||||
-- Metrics --
|
-- Metrics --
|
||||||
count(distinct aos.id_accommodation) as accommodation_with_offered_service_count
|
count(distinct aos.id_accommodation) as accommodation_with_offered_service_count
|
||||||
from {{ ref("int_kpis__dimension_dates") }} d
|
from {{ ref("int_kpis__dimension_dates") }} d
|
||||||
inner join
|
left join
|
||||||
{{ ref("int_kpis__metric_daily_new_dash_accommodation_offered_services") }}
|
{{ ref("int_kpis__metric_daily_new_dash_accommodation_offered_services") }}
|
||||||
as aos
|
as aos
|
||||||
on aos.date = d.date
|
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
|
group by 1, 2, 3
|
||||||
{% if not loop.last %}
|
{% if not loop.last %}
|
||||||
union all
|
union all
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@
|
||||||
-- Metrics --
|
-- Metrics --
|
||||||
count(distinct dos.id_deal) as deal_with_offered_service_count
|
count(distinct dos.id_deal) as deal_with_offered_service_count
|
||||||
from {{ ref("int_kpis__dimension_dates") }} d
|
from {{ ref("int_kpis__dimension_dates") }} d
|
||||||
inner join
|
left join
|
||||||
{{ ref("int_kpis__metric_daily_new_dash_deals_offered_services") }} as dos
|
{{ ref("int_kpis__metric_daily_new_dash_deals_offered_services") }} as dos
|
||||||
on dos.date = d.date
|
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
|
group by 1, 2, 3
|
||||||
{% if not loop.last %}
|
{% if not loop.last %}
|
||||||
union all
|
union all
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@
|
||||||
-- Metrics --
|
-- Metrics --
|
||||||
count(distinct aos.id_accommodation) as accommodation_with_offered_service_count
|
count(distinct aos.id_accommodation) as accommodation_with_offered_service_count
|
||||||
from {{ ref("int_kpis__dimension_dates") }} d
|
from {{ ref("int_kpis__dimension_dates") }} d
|
||||||
inner join
|
left join
|
||||||
{{ ref("int_kpis__metric_daily_new_dash_accommodation_offered_services") }}
|
{{ ref("int_kpis__metric_daily_new_dash_accommodation_offered_services") }}
|
||||||
as aos
|
as aos
|
||||||
on aos.date = d.date
|
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
|
group by 1, 2, 3
|
||||||
{% if not loop.last %}
|
{% if not loop.last %}
|
||||||
union all
|
union all
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@
|
||||||
-- Metrics --
|
-- Metrics --
|
||||||
count(distinct dos.id_deal) as deal_with_offered_service_count
|
count(distinct dos.id_deal) as deal_with_offered_service_count
|
||||||
from {{ ref("int_kpis__dimension_dates") }} d
|
from {{ ref("int_kpis__dimension_dates") }} d
|
||||||
inner join
|
left join
|
||||||
{{ ref("int_kpis__metric_daily_new_dash_deals_offered_services") }} as dos
|
{{ ref("int_kpis__metric_daily_new_dash_deals_offered_services") }} as dos
|
||||||
on dos.date = d.date
|
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
|
group by 1, 2, 3
|
||||||
{% if not loop.last %}
|
{% if not loop.last %}
|
||||||
union all
|
union all
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue