How to write a query that group facets from multi edges together?

I did not get it, can you show a pseudo-result from what you imagine it would be?