Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
298 B
1
Indexable
Never
select distinct X, Y
from Functions func_a
where
(X = Y and (select count(func_b.X) from Functions func_b where func_a.X = func_b.Y and func_a.Y = func_b.X) > 1)
or
(X < Y and (select count(func_b.X) from Functions func_b where func_a.X = func_b.Y and func_a.Y = func_b.X) > 0)
order by X, Y;