Distinct(Project(Filter((?c1 != ?c2), BGP( ?t1 ?c1 . ?t1 ?c2)), {?t1, ?c1, ?c2}))