SELECT event_type, AVG(occurences) AS avg_occurencesFROM EventsGROUP BY event_type;
SELECT e.business_idFROM Events e JOIN ( SELECT event_type, AVG(occurences) AS avg_occurences FROM Events GROUP BY event_type) tON e.event_type=t.event_typeWHERE e.occurences>t.avg_occurencesGROUP BY e.business_idHAVING COUNT(e.business_id)>1;