Changed date name to check_in_cover_added_date and included model in reporting
This commit is contained in:
parent
3ce81dfdd1
commit
6bc26a66ff
4 changed files with 14 additions and 6 deletions
|
|
@ -16,8 +16,9 @@ with
|
||||||
-- vs.isactive is to consider the current verification set used by the host
|
-- vs.isactive is to consider the current verification set used by the host
|
||||||
-- vstvt.id_verification_type = 15 is the value for check_in_cover verification
|
-- vstvt.id_verification_type = 15 is the value for check_in_cover verification
|
||||||
),
|
),
|
||||||
adoption_date as (
|
check_in_cover_added_date as (
|
||||||
select vs.id_user_host, min(date(vs.created_at_utc)) as adoption_date
|
select
|
||||||
|
vs.id_user_host, min(date(vs.created_at_utc)) as check_in_cover_added_date
|
||||||
from stg_core__verification_set as vs
|
from stg_core__verification_set as vs
|
||||||
left join hosts_with_check_in_cover as hcv on vs.id_user_host = hcv.id_user_host
|
left join hosts_with_check_in_cover as hcv on vs.id_user_host = hcv.id_user_host
|
||||||
left join
|
left join
|
||||||
|
|
@ -37,9 +38,9 @@ select
|
||||||
u.phone_number,
|
u.phone_number,
|
||||||
u.joined_at_utc,
|
u.joined_at_utc,
|
||||||
u.joined_date_utc,
|
u.joined_date_utc,
|
||||||
ad.adoption_date,
|
ad.check_in_cover_added_date,
|
||||||
u.billing_town,
|
u.billing_town,
|
||||||
u.company_name
|
u.company_name
|
||||||
from stg_core__user u
|
from stg_core__user u
|
||||||
inner join hosts_with_check_in_cover hcih on hcih.id_user_host = u.id_user
|
inner join hosts_with_check_in_cover hcih on hcih.id_user_host = u.id_user
|
||||||
left join adoption_date ad on ad.id_user_host = u.id_user
|
left join check_in_cover_added_date ad on ad.id_user_host = u.id_user
|
||||||
|
|
|
||||||
|
|
@ -970,9 +970,10 @@ models:
|
||||||
data_type: date
|
data_type: date
|
||||||
description: Date the user joined
|
description: Date the user joined
|
||||||
|
|
||||||
- name: adoption_date
|
- name: check_in_cover_added_date
|
||||||
data_type: date
|
data_type: date
|
||||||
description: Date the user adopted check-in cover
|
description:
|
||||||
|
Date the user first included check-in cover
|
||||||
|
|
||||||
- name: billing_town
|
- name: billing_town
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ select
|
||||||
phone_number as phone_number,
|
phone_number as phone_number,
|
||||||
joined_at_utc as joined_at_utc,
|
joined_at_utc as joined_at_utc,
|
||||||
joined_date_utc as joined_date_utc,
|
joined_date_utc as joined_date_utc,
|
||||||
|
check_in_cover_added_date as check_in_cover_added_date,
|
||||||
billing_town as billing_town,
|
billing_town as billing_town,
|
||||||
company_name as company_name
|
company_name as company_name
|
||||||
from int_core__check_in_cover_users
|
from int_core__check_in_cover_users
|
||||||
|
|
|
||||||
|
|
@ -924,6 +924,11 @@ models:
|
||||||
data_type: date
|
data_type: date
|
||||||
description: Date the user joined
|
description: Date the user joined
|
||||||
|
|
||||||
|
- name: check_in_cover_added_date
|
||||||
|
data_type: date
|
||||||
|
description:
|
||||||
|
Date the user first included check-in cover
|
||||||
|
|
||||||
- name: billing_town
|
- name: billing_town
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: ""
|
description: ""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue