I'm trying to ignore duplicates between two providers in my tables while using join.
I'm using this query for now:
SELECT *
FROM A AS a1, A AS a2
WHERE a1.provider <> a2.provider AND a1.etype = a2.etype
Unfortunately, that query gives me duplicates (two rows of the same providers, in opposite sides).
I'm trying to ignore rows that appear twice in the opposite sides, for example:
etype provider etype provider
hello aaa hello bbb
hello bbb hello aaa
This dbfiddle illustrates the desired output as well.