I want to change the condition on the array column call_type
in below query so it excludes everything that has 'visit_occurred'.
How do I work with that array part?
select staff_id,
COUNT(event_id) as offered
from call_logs as logs
where visit_offered
and contact_date between now() - interval '1 weeks' and now()
and provider_type = 'Contractor'
and contact_with != 'company_staff'
and direction = 'outbound'
and outcome = 'Successful'
and call_type && array ['Schedule','schedule_visit']
group by staff_id;