Addressed comments
This commit is contained in:
parent
82829db3d2
commit
2637d68398
4 changed files with 94 additions and 0 deletions
|
|
@ -44,6 +44,27 @@ with
|
||||||
atpb_aggregation as (
|
atpb_aggregation as (
|
||||||
select
|
select
|
||||||
upb.id_user_host,
|
upb.id_user_host,
|
||||||
|
-- To be deleted from here
|
||||||
|
count(
|
||||||
|
distinct case
|
||||||
|
when
|
||||||
|
atpb.user_product_bundle_name
|
||||||
|
not in ({{ var("default_service") }})
|
||||||
|
then atpb.id_accommodation
|
||||||
|
else null
|
||||||
|
end
|
||||||
|
) as total_listings_with_product_bundle_with_paid_service,
|
||||||
|
count(
|
||||||
|
distinct case
|
||||||
|
when
|
||||||
|
atpb.user_product_bundle_name
|
||||||
|
not in ({{ var("default_service") }})
|
||||||
|
and atpb.has_no_end_date = true
|
||||||
|
then atpb.id_accommodation
|
||||||
|
else null
|
||||||
|
end
|
||||||
|
) as total_listings_with_active_product_bundle_with_paid_service,
|
||||||
|
-- To be deleted until here
|
||||||
count(
|
count(
|
||||||
distinct case
|
distinct case
|
||||||
when
|
when
|
||||||
|
|
@ -118,6 +139,10 @@ with
|
||||||
a.total_active_listings,
|
a.total_active_listings,
|
||||||
atpb.total_active_listings_with_active_product_bundle,
|
atpb.total_active_listings_with_active_product_bundle,
|
||||||
atpb.total_active_listings_with_active_product_bundle_with_paid_service,
|
atpb.total_active_listings_with_active_product_bundle_with_paid_service,
|
||||||
|
-- To be deleted from here
|
||||||
|
atpb.total_listings_with_product_bundle_with_paid_service,
|
||||||
|
atpb.total_listings_with_active_product_bundle_with_paid_service,
|
||||||
|
-- To be deleted until here
|
||||||
btpb.total_bookings_with_product_bundle,
|
btpb.total_bookings_with_product_bundle,
|
||||||
btpb.total_bookings_with_product_bundle_with_paid_service
|
btpb.total_bookings_with_product_bundle_with_paid_service
|
||||||
from upb_aggregation upb
|
from upb_aggregation upb
|
||||||
|
|
@ -159,6 +184,18 @@ select
|
||||||
then 1
|
then 1
|
||||||
else 0
|
else 0
|
||||||
end as has_active_listings_with_active_paid_service_applied,
|
end as has_active_listings_with_active_paid_service_applied,
|
||||||
|
-- To be deleted from here
|
||||||
|
total_listings_with_product_bundle_with_paid_service,
|
||||||
|
total_listings_with_active_product_bundle_with_paid_service,
|
||||||
|
case
|
||||||
|
when total_listings_with_product_bundle_with_paid_service > 0 then 1 else 0
|
||||||
|
end as has_listings_with_paid_service_applied,
|
||||||
|
case
|
||||||
|
when total_listings_with_active_product_bundle_with_paid_service > 0
|
||||||
|
then 1
|
||||||
|
else 0
|
||||||
|
end as has_listings_with_active_paid_service_applied,
|
||||||
|
-- To be deleted until here
|
||||||
total_bookings_with_product_bundle,
|
total_bookings_with_product_bundle,
|
||||||
total_bookings_with_product_bundle_with_paid_service,
|
total_bookings_with_product_bundle_with_paid_service,
|
||||||
case
|
case
|
||||||
|
|
|
||||||
|
|
@ -2666,6 +2666,30 @@ models:
|
||||||
description: |
|
description: |
|
||||||
Integer-based flag version of
|
Integer-based flag version of
|
||||||
total_active_listings_with_active_product_bundle_with_paid_service.
|
total_active_listings_with_active_product_bundle_with_paid_service.
|
||||||
|
|
||||||
|
# To be deleted from here
|
||||||
|
- name: total_listings_with_product_bundle_with_paid_service
|
||||||
|
data_type: integer
|
||||||
|
description: |
|
||||||
|
Count of listings that have, or have had, a paid service
|
||||||
|
product bundle activated.
|
||||||
|
|
||||||
|
- name: total_listings_with_active_product_bundle_with_paid_service
|
||||||
|
data_type: integer
|
||||||
|
description: |
|
||||||
|
Count of listings that currently have an active paid service
|
||||||
|
product bundle.
|
||||||
|
|
||||||
|
- name: has_listings_with_paid_service_applied
|
||||||
|
data_type: integer
|
||||||
|
description: |
|
||||||
|
Integer-based flag version of total_listings_with_product_bundle_with_paid_service.
|
||||||
|
|
||||||
|
- name: has_listings_with_active_paid_service_applied
|
||||||
|
data_type: integer
|
||||||
|
description: |
|
||||||
|
Integer-based flag version of total_listings_with_active_product_bundle_with_paid_service.
|
||||||
|
# To be deleted until here
|
||||||
|
|
||||||
- name: total_bookings_with_product_bundle
|
- name: total_bookings_with_product_bundle
|
||||||
data_type: integer
|
data_type: integer
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,15 @@ select
|
||||||
as has_active_listings_with_active_product_bundle_applied,
|
as has_active_listings_with_active_product_bundle_applied,
|
||||||
has_active_listings_with_active_paid_service_applied
|
has_active_listings_with_active_paid_service_applied
|
||||||
as has_active_listings_with_active_paid_service_applied,
|
as has_active_listings_with_active_paid_service_applied,
|
||||||
|
-- To be deleted from here
|
||||||
|
total_listings_with_product_bundle_with_paid_service
|
||||||
|
as total_listings_with_product_bundle_with_paid_service,
|
||||||
|
total_listings_with_active_product_bundle_with_paid_service
|
||||||
|
as total_listings_with_active_product_bundle_with_paid_service,
|
||||||
|
has_listings_with_paid_service_applied as has_listings_with_paid_service_applied,
|
||||||
|
has_listings_with_active_paid_service_applied
|
||||||
|
as has_listings_with_active_paid_service_applied,
|
||||||
|
-- To be deleted until here
|
||||||
total_bookings_with_product_bundle as total_bookings_with_product_bundle,
|
total_bookings_with_product_bundle as total_bookings_with_product_bundle,
|
||||||
total_bookings_with_product_bundle_with_paid_service
|
total_bookings_with_product_bundle_with_paid_service
|
||||||
as total_bookings_with_product_bundle_with_paid_service,
|
as total_bookings_with_product_bundle_with_paid_service,
|
||||||
|
|
|
||||||
|
|
@ -1262,6 +1262,30 @@ models:
|
||||||
description: |
|
description: |
|
||||||
Integer-based flag version of
|
Integer-based flag version of
|
||||||
total_active_listings_with_active_product_bundle_with_paid_service.
|
total_active_listings_with_active_product_bundle_with_paid_service.
|
||||||
|
|
||||||
|
# To be deleted from here
|
||||||
|
- name: total_listings_with_product_bundle_with_paid_service
|
||||||
|
data_type: integer
|
||||||
|
description: |
|
||||||
|
Count of listings that have, or have had, a paid service
|
||||||
|
product bundle activated.
|
||||||
|
|
||||||
|
- name: total_listings_with_active_product_bundle_with_paid_service
|
||||||
|
data_type: integer
|
||||||
|
description: |
|
||||||
|
Count of listings that currently have an active paid service
|
||||||
|
product bundle.
|
||||||
|
|
||||||
|
- name: has_listings_with_paid_service_applied
|
||||||
|
data_type: integer
|
||||||
|
description: |
|
||||||
|
Integer-based flag version of total_listings_with_product_bundle_with_paid_service.
|
||||||
|
|
||||||
|
- name: has_listings_with_active_paid_service_applied
|
||||||
|
data_type: integer
|
||||||
|
description: |
|
||||||
|
Integer-based flag version of total_listings_with_active_product_bundle_with_paid_service.
|
||||||
|
# To be deleted until here
|
||||||
|
|
||||||
- name: total_bookings_with_product_bundle
|
- name: total_bookings_with_product_bundle
|
||||||
data_type: integer
|
data_type: integer
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue