From b03982b708a3cc22ff9b7779491b42da9cc4b551 Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Mon, 2 Dec 2024 08:44:24 +0100 Subject: [PATCH] Added total fee cost of booking --- .../cross/int_edeposit_and_athena_verifications.sql | 2 ++ models/intermediate/cross/schema.yml | 4 ++++ models/reporting/cross/edeposit_and_athena_verifications.sql | 1 + models/reporting/cross/schema.yml | 4 ++++ 4 files changed, 11 insertions(+) diff --git a/models/intermediate/cross/int_edeposit_and_athena_verifications.sql b/models/intermediate/cross/int_edeposit_and_athena_verifications.sql index 399762d..db43c0b 100644 --- a/models/intermediate/cross/int_edeposit_and_athena_verifications.sql +++ b/models/intermediate/cross/int_edeposit_and_athena_verifications.sql @@ -13,6 +13,7 @@ select av.verification_status, av.nightly_fee_local, av.number_nights, + av.nightly_fee_local * av.number_nights as total_fee_local, av.email_flag, av.phone_flag, av.watch_list, @@ -55,6 +56,7 @@ select ev.verification_source, ev.verification_status, ev.nightly_fee_local, + ev.nightly_fee_local * ev.number_nights as total_fee_local, ev.number_nights, ev.email_flag, ev.phone_flag, diff --git a/models/intermediate/cross/schema.yml b/models/intermediate/cross/schema.yml index a4f4d03..efef2f1 100644 --- a/models/intermediate/cross/schema.yml +++ b/models/intermediate/cross/schema.yml @@ -1246,6 +1246,10 @@ models: data_type: integer description: "number of nights for the booking" + - name: total_fee_local + data_type: double precision + description: "total fee for the booking" + - name: email_flag data_type: text description: "screening result for email" diff --git a/models/reporting/cross/edeposit_and_athena_verifications.sql b/models/reporting/cross/edeposit_and_athena_verifications.sql index 697cb28..8a50fdd 100644 --- a/models/reporting/cross/edeposit_and_athena_verifications.sql +++ b/models/reporting/cross/edeposit_and_athena_verifications.sql @@ -12,6 +12,7 @@ select eav.verification_status as verification_status, eav.nightly_fee_local as nightly_fee_local, eav.number_nights as number_nights, + eav.total_fee_local as total_fee_local, eav.email_flag as email_flag, eav.phone_flag as phone_flag, eav.watch_list as watch_list, diff --git a/models/reporting/cross/schema.yml b/models/reporting/cross/schema.yml index 3a946e2..7587529 100644 --- a/models/reporting/cross/schema.yml +++ b/models/reporting/cross/schema.yml @@ -63,6 +63,10 @@ models: data_type: integer description: "number of nights for the booking" + - name: total_fee_local + data_type: double precision + description: "total fee for the booking" + - name: email_flag data_type: text description: "screening result for email"