I have two cypher queries like below:
match sg1 = (n:PI)-[:HAS_DEGREE]-(d:Degree { name : "FACP" } ) , sg2=(n:PI)-[:HAS_SPECIALTY]-(s:Specialty {name: "Gastroenterology"}) return sg1,sg2
match sg1 = (s:Specialty {name: "Gastroenterology"})-[:HAS_SPECIALTY]-(n:PI)-[:HAS_DEGREE]-(d:Degree { name : "FACP" } ) return sg1
How do I compare them programmably? In general, to achieve the same result, different cypher queries can be used. How do I know if two queries actually produce the same result without comparing directly the output (suppose the set of queries is very large)?