simple
select actor_id, director_id\nfrom actordirector\ngroup by actor_id, director_id\nhaving count(actor_id = director_id) >= 3\n;
select actor_id, director_id\nfrom actordirector\ngroup by actor_id, director_id\nhaving count(actor_id = director_id) >= 3\n;
[]