Recently I had to use a query where I needed results from an entity however using N:N relationship. I have used query expression in the past however came across something which is much simpler and can get results in advanced find and can use same FetchXML in plugins and/or other applications where we can use this query.
First thing need to do is go to N:N Relationships under entity
Give it a name
and make sure searchable is set to yes
Save and publish changes.