Fixed variable call and naming

This commit is contained in:
Joaquin Ossa 2025-02-14 12:19:15 +01:00
parent 4b94d5f70b
commit aadd0c244b
2 changed files with 5 additions and 5 deletions

View file

@ -144,7 +144,7 @@ with
) as number_bookings_with_service_status_paid, ) as number_bookings_with_service_status_paid,
count( count(
distinct case distinct case
when upper(sd.service_status) = {{ paid_service_status }} when upper(sd.service_status) = {{ pending_service_status }}
then sd.id_booking then sd.id_booking
else null else null
end end
@ -155,7 +155,7 @@ with
then sd.id_booking then sd.id_booking
else null else null
end end
) as number_bookings_with_service_status_unknown_status, ) as number_bookings_with_service_status_unknown,
count( count(
distinct case distinct case
when when
@ -220,7 +220,7 @@ select
b.number_bookings_with_service_status_no_flags, b.number_bookings_with_service_status_no_flags,
b.number_bookings_with_service_status_paid, b.number_bookings_with_service_status_paid,
b.number_bookings_with_service_status_pending, 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_partially_protected,
b.number_bookings_with_service_status_not_protected, b.number_bookings_with_service_status_not_protected,
b.number_bookings_with_service_status_not_paid, b.number_bookings_with_service_status_not_paid,

View file

@ -25,8 +25,8 @@ select
as number_bookings_with_service_status_paid, as number_bookings_with_service_status_paid,
number_bookings_with_service_status_pending number_bookings_with_service_status_pending
as number_bookings_with_service_status_pending, as number_bookings_with_service_status_pending,
number_bookings_with_service_status_unknown_status number_bookings_with_service_status_unknown
as number_bookings_with_service_status_unknown_status, as number_bookings_with_service_status_unknown,
number_bookings_with_service_status_partially_protected number_bookings_with_service_status_partially_protected
as number_bookings_with_service_status_partially_protected, as number_bookings_with_service_status_partially_protected,
number_bookings_with_service_status_not_protected number_bookings_with_service_status_not_protected