I have two custom objects: A and B. I want to relate these two objects via tags. So for example I show object A on my Visualforce page. Now every object B that has the same tags as object A should show up under object A:
A (tags: x,y,z)
-B (tags: x,y)
-B (tags: y)
-B (tags: x,z)
How can I realize that? How would the SOQL query look like?
Thank you very much for your effort,