Problem
Solution
WITH Average AS (
SELECT event_type, AVG(occurences) as occurences
FROM Events
GROUP BY event_type
)
SELECT business_id
FROM (
SELECT business_id, COUNT(business_id) as counts FROM Events
JOIN Average ON Events.event_type = Average.event_type
WHERE Events.occurences > Average.occurences
GROUP BY business_id
) AS Temp
WHERE counts > 1