Commit update
This commit is contained in:
parent
7f8e7489e4
commit
68bddf2b7d
2 changed files with 36 additions and 65 deletions
|
|
@ -31,11 +31,7 @@ with
|
|||
from jsonb_array_elements(status_history_logs::jsonb) status_step
|
||||
order by (status_step ->> 'CreatedDate')::timestamp desc
|
||||
limit 1
|
||||
) as last_status_at_utc,
|
||||
(
|
||||
select count(*)
|
||||
from jsonb_array_elements(host_user_claim_logs::jsonb) comment
|
||||
) as claims_count
|
||||
) as last_status_at_utc
|
||||
from stg_resolutions__incidents
|
||||
),
|
||||
damage_reported_items as (
|
||||
|
|
@ -72,7 +68,6 @@ with
|
|||
select
|
||||
-- Basic Incident Details
|
||||
i.id_incident,
|
||||
i.id_user,
|
||||
i.id_verification,
|
||||
i.current_status_name,
|
||||
i.is_submission_complete,
|
||||
|
|
@ -119,7 +114,6 @@ select
|
|||
|
||||
-- Host Details
|
||||
i.id_user_host,
|
||||
lt.claims_count,
|
||||
i.host_account_name,
|
||||
|
||||
-- Host Contact Details
|
||||
|
|
@ -148,7 +142,7 @@ select
|
|||
i.has_host_taken_preventative_steps,
|
||||
i.guest_contribution_amount_in_txn_currency,
|
||||
i.guest_contribution_currency,
|
||||
i.guest_contacted_about_damage,
|
||||
i.is_guest_contacted_about_damage,
|
||||
|
||||
-- Accommodation Details
|
||||
i.id_accommodation,
|
||||
|
|
@ -161,8 +155,7 @@ select
|
|||
i.check_out_date_utc,
|
||||
i.id_booking,
|
||||
i.booking_status,
|
||||
i.id_reservation,
|
||||
i.booking_protection
|
||||
i.id_reservation
|
||||
|
||||
from stg_resolutions__incidents i
|
||||
left join logs_timeline lt on i.id_incident = lt.id_incident
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue