I want to make a blacklist for my system. When someone cancelled 3 times he must be blacklisted. So a reservation
has a booker_id
so I have to count all this booker id's with the status canceled. The status canceled is in the other column reservation_status
.
Can someone help me with this query please? I have something like this but don't know if it is in the good way
select count(case
when reservation_status = 'Canceled' then 1
else null end) as booker_id