Concatenate two column values alphabetically? or... Unique combinations from columns?

I think it can be solved with enumeration and a self-join where Column 1 matches Column 2 and the other way around. In this case, comparing row numbers will tell us whether we had this combination previously or not.

See the example below:

unique-combinations.morph (2.7 KB)

From a theoretical perspective, this is a task of finding loops of length = 2 in a directed graph. Usually, graph calculations are performed using either self-joins (straight-forward in EasyMorph) or matrix multiplications (not that straight-forward, but still doable).