Something like this?
SELECT COUNT(*) EventCount
FROM #Events e2
WHERE e2.intUserId = e1.intUserId
AND ABS(DATEDIFF(mi, e1.datEvent, e2.datEvent)) < 5
HAVING COUNT(*) > 10
) e2If that is logically what you need, and if it turns out the query is very slow, it can be optimized.