new dash new data
This commit is contained in:
parent
311ddd8678
commit
463f5edfc3
4 changed files with 35 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ with
|
||||||
int_core__accommodation_to_product_bundle as (
|
int_core__accommodation_to_product_bundle as (
|
||||||
select * from {{ ref("int_core__accommodation_to_product_bundle") }}
|
select * from {{ ref("int_core__accommodation_to_product_bundle") }}
|
||||||
),
|
),
|
||||||
|
int_core__new_dash_users as (select * from {{ ref("int_core__new_dash_users") }}),
|
||||||
|
|
||||||
user_aggregation as (
|
user_aggregation as (
|
||||||
|
|
||||||
|
|
@ -21,7 +22,9 @@ with
|
||||||
uh.company_name,
|
uh.company_name,
|
||||||
uh.first_name,
|
uh.first_name,
|
||||||
uh.last_name,
|
uh.last_name,
|
||||||
|
uh.email,
|
||||||
uh.account_currency_iso4217 as account_currency,
|
uh.account_currency_iso4217 as account_currency,
|
||||||
|
ndu.user_in_new_dash_since_date_utc,
|
||||||
count(distinct upb.id_user_product_bundle) as total_user_product_bundles,
|
count(distinct upb.id_user_product_bundle) as total_user_product_bundles,
|
||||||
count(
|
count(
|
||||||
distinct case
|
distinct case
|
||||||
|
|
@ -64,6 +67,7 @@ with
|
||||||
end
|
end
|
||||||
) as total_bookings_with_product_bundle_with_paid_service
|
) as total_bookings_with_product_bundle_with_paid_service
|
||||||
from int_core__user_product_bundle upb
|
from int_core__user_product_bundle upb
|
||||||
|
inner join int_core__new_dash_users ndu on upb.id_user_host = ndu.id_user_host
|
||||||
inner join int_core__user_host uh on upb.id_user_host = uh.id_user_host
|
inner join int_core__user_host uh on upb.id_user_host = uh.id_user_host
|
||||||
left join
|
left join
|
||||||
int_core__booking_to_product_bundle btpb
|
int_core__booking_to_product_bundle btpb
|
||||||
|
|
@ -72,7 +76,7 @@ with
|
||||||
left join
|
left join
|
||||||
int_core__accommodation_to_product_bundle atpb
|
int_core__accommodation_to_product_bundle atpb
|
||||||
on upb.id_user_product_bundle = atpb.id_user_product_bundle
|
on upb.id_user_product_bundle = atpb.id_user_product_bundle
|
||||||
group by 1, 2, 3, 4, 5, 6, 7
|
group by 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||||
|
|
||||||
)
|
)
|
||||||
select
|
select
|
||||||
|
|
@ -82,7 +86,9 @@ select
|
||||||
company_name,
|
company_name,
|
||||||
first_name,
|
first_name,
|
||||||
last_name,
|
last_name,
|
||||||
|
email,
|
||||||
account_currency,
|
account_currency,
|
||||||
|
user_in_new_dash_since_date_utc,
|
||||||
total_user_product_bundles,
|
total_user_product_bundles,
|
||||||
total_active_user_product_bundles,
|
total_active_user_product_bundles,
|
||||||
total_listings,
|
total_listings,
|
||||||
|
|
|
||||||
|
|
@ -2428,11 +2428,24 @@ models:
|
||||||
description: |
|
description: |
|
||||||
Information about the host user.
|
Information about the host user.
|
||||||
|
|
||||||
|
- name: email
|
||||||
|
data_type: string
|
||||||
|
description: |
|
||||||
|
Information about the host user.
|
||||||
|
|
||||||
- name: account_currency
|
- name: account_currency
|
||||||
data_type: string
|
data_type: string
|
||||||
description: |
|
description: |
|
||||||
Currency associated to the host user.
|
Currency associated to the host user.
|
||||||
|
|
||||||
|
- name: user_in_new_dash_since_date_utc
|
||||||
|
data_type: integer
|
||||||
|
description: |
|
||||||
|
For users that are in New Dash, the effective date since
|
||||||
|
these users can be considered in New Dash. It the user
|
||||||
|
has moved from Old Dash, it will be the new_dash_move_date_utc.
|
||||||
|
If not, it will correspond to the joined_date_utc.
|
||||||
|
|
||||||
- name: total_user_product_bundles
|
- name: total_user_product_bundles
|
||||||
data_type: integer
|
data_type: integer
|
||||||
description: |
|
description: |
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,9 @@ select
|
||||||
company_name as company_name,
|
company_name as company_name,
|
||||||
first_name as first_name,
|
first_name as first_name,
|
||||||
last_name as last_name,
|
last_name as last_name,
|
||||||
|
email as email,
|
||||||
account_currency as account_currency,
|
account_currency as account_currency,
|
||||||
|
user_in_new_dash_since_date_utc as user_in_new_dash_since_date_utc,
|
||||||
total_user_product_bundles as total_user_product_bundles,
|
total_user_product_bundles as total_user_product_bundles,
|
||||||
total_active_user_product_bundles as total_active_user_product_bundles,
|
total_active_user_product_bundles as total_active_user_product_bundles,
|
||||||
total_listings as total_listings,
|
total_listings as total_listings,
|
||||||
|
|
|
||||||
|
|
@ -1164,11 +1164,24 @@ models:
|
||||||
description: |
|
description: |
|
||||||
Information about the host user.
|
Information about the host user.
|
||||||
|
|
||||||
|
- name: email
|
||||||
|
data_type: string
|
||||||
|
description: |
|
||||||
|
Information about the host user.
|
||||||
|
|
||||||
- name: account_currency
|
- name: account_currency
|
||||||
data_type: string
|
data_type: string
|
||||||
description: |
|
description: |
|
||||||
Currency associated to the host user.
|
Currency associated to the host user.
|
||||||
|
|
||||||
|
- name: user_in_new_dash_since_date_utc
|
||||||
|
data_type: integer
|
||||||
|
description: |
|
||||||
|
For users that are in New Dash, the effective date since
|
||||||
|
these users can be considered in New Dash. It the user
|
||||||
|
has moved from Old Dash, it will be the new_dash_move_date_utc.
|
||||||
|
If not, it will correspond to the joined_date_utc.
|
||||||
|
|
||||||
- name: total_user_product_bundles
|
- name: total_user_product_bundles
|
||||||
data_type: integer
|
data_type: integer
|
||||||
description: |
|
description: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue