Finding common connections

Analytics

Finding common connections

Hi, I'm trying to solve for a question where I need to find common connection between May and Frank in a database containing million rows. The data is presented in the way below.  How to sollve for finding the common connections between May and Frank? Thanks!

user id connectoin id
May Olson
Tom Tilda
Tilda Frank
Olson Tilda
Tom May
Frank Olson
...