I have a table like this:
strt end no of km
------------------------------------
California India 9000
Singapore India 3000
India Frankfurt 6700
Frankfurt Singapore 4500
India Indonesia 3000
India California 9000
India Singapore 3000
Frankfurt India 6700
Singapore Frankfurt 4500
Indonesia India 3000
I need to get distinct rows from this by considering start and end point (we should get single entry even If we interchange the start and end values ). I tried concat the columns start and end as a list and sort the elements in the list and then applied distinct.
Is there any SQL query for this? Thanks in advance.
Output should be like this
strt end no of km
-------------------------------
California India 9000
Singapore India 3000
India Frankfurt 6700
Frankfurt Singapore 4500
India Indonesia 3000