added booking_start comparison

This commit is contained in:
Jottyfan
2024-03-16 21:48:26 +01:00
parent 1ff307b9ed
commit 66f50a6fe9
5 changed files with 48 additions and 5 deletions

View File

@ -32,7 +32,8 @@ with female(used, fk_camp) as (
c.blocked_beds_male,
coalesce(male.used, 0) as used_beds_male,
coalesce(female.used, 0) as used_beds_female,
c.start_booking
c.start_booking,
(c.start_booking < now()) as booking_has_started
from public.t_camp c
left join public.t_location l on c.fk_location = l.pk
left join male on male.fk_camp = c.pk