From aadd0c244b1f963cb7b8a9562d2d1b81a32a3e0d Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Fri, 14 Feb 2025 12:19:15 +0100 Subject: [PATCH] Fixed variable call and naming --- .../core/int_core__new_dash_services_offered.sql | 6 +++--- models/reporting/core/core__new_dash_services_offered.sql | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/models/intermediate/core/int_core__new_dash_services_offered.sql b/models/intermediate/core/int_core__new_dash_services_offered.sql index 1fa96c6..a3bb2bb 100644 --- a/models/intermediate/core/int_core__new_dash_services_offered.sql +++ b/models/intermediate/core/int_core__new_dash_services_offered.sql @@ -144,7 +144,7 @@ with ) as number_bookings_with_service_status_paid, count( distinct case - when upper(sd.service_status) = {{ paid_service_status }} + when upper(sd.service_status) = {{ pending_service_status }} then sd.id_booking else null end @@ -155,7 +155,7 @@ with then sd.id_booking else null end - ) as number_bookings_with_service_status_unknown_status, + ) as number_bookings_with_service_status_unknown, count( distinct case when @@ -220,7 +220,7 @@ select b.number_bookings_with_service_status_no_flags, b.number_bookings_with_service_status_paid, b.number_bookings_with_service_status_pending, - b.number_bookings_with_service_status_unknown_status, + b.number_bookings_with_service_status_unknown, b.number_bookings_with_service_status_partially_protected, b.number_bookings_with_service_status_not_protected, b.number_bookings_with_service_status_not_paid, diff --git a/models/reporting/core/core__new_dash_services_offered.sql b/models/reporting/core/core__new_dash_services_offered.sql index 44573b4..07ccfbf 100644 --- a/models/reporting/core/core__new_dash_services_offered.sql +++ b/models/reporting/core/core__new_dash_services_offered.sql @@ -25,8 +25,8 @@ select as number_bookings_with_service_status_paid, number_bookings_with_service_status_pending as number_bookings_with_service_status_pending, - number_bookings_with_service_status_unknown_status - as number_bookings_with_service_status_unknown_status, + number_bookings_with_service_status_unknown + as number_bookings_with_service_status_unknown, number_bookings_with_service_status_partially_protected as number_bookings_with_service_status_partially_protected, number_bookings_with_service_status_not_protected