Which events only have 1 note?
select t1.customer_event_id from customer_events as t1 join customer_event_notes as t2 on t1.customer_event_id = t2.customer_event_id group by t1.customer_event_id having count ( * ) = 1
What about events that have 2 or 3 notes as well? Can you add those to the list.
select t1.customer_event_id from customer_events as t1 join customer_event_notes as t2 on t1.customer_event_id = t2.customer_event_id group by t1.customer_event_id having count ( * ) between 1 and 3
Can you show all the events that have one, two or three notes with their property ids?
select t1.customer_event_id, t1.property_id from customer_events as t1 join customer_event_notes as t2 on t1.customer_event_id = t2.customer_event_id group by t1.customer_event_id having count ( * ) between 1 and 3