Need suggestions for writing query

Hi there ,

How to remove same node relationships globally
with one line query.

How to query the nodes must have both side
of same relationships.

kindly see the attachments for better understandings
properties for each nodes :

countryCode

91

mobile

MEFYNnF2cW1aWkZKeHBpRaTNnZz09OjoxMTEwMDAxMTAw

name

khyati

userId

14161218

To delete relationships that refer to the same node:

match(a)-[r]-(a) delete r

How to query for relationships that connect two different nodes:

match(a)-[r]-(b) where id(a)<>id(b) return r