Created model in reporting as well with schema

This commit is contained in:
Joaquin Ossa 2024-07-03 16:34:33 +02:00
parent fb61c69714
commit 3b22832d8b
3 changed files with 110 additions and 5 deletions

View file

@ -46,11 +46,15 @@ select
u.date_of_birth,
extract(year from age(u.date_of_birth)) as age_of_guest,
case
when pt.checkincover is true then true else false
when pt.has_check_in_cover_payment is true then true else false
end as has_check_in_cover_payment,
case when pt.waiver is true then true else false end as has_waiver_payment,
case when pt.deposit is true then true else false end as has_deposit_payment,
case when pt.fee is true then true else false end as has_fee_payment
case
when pt.has_waiver_payment is true then true else false
end as has_waiver_payment,
case
when pt.has_deposit_payment is true then true else false
end as has_deposit_payment,
case when pt.has_fee_payment is true then true else false end as has_fee_payment
from staging.stg_core__guest_satisfaction_responses gss
left join
staging.stg_core__verification_request vr