Hello Team,
I am writing a cypher query to find out how many people one person met with another. A person has a bidirectional relationship HAS_MET which indicates the number of counts they met each other as well as a timestamp.
query looks like this
//ahmad contact of contact in last 14 days
match (p:Person)-[rel1:HAS_MET]->()-[rel2:HAS_MET]->(other)
with p,other,rel1.timeStamp as firstContactTime, rel2.timeStamp as secondContactTime
where p.id=1 and datetime() > firstContactTime >datetime("2020-04-03T19:32:24") and datetime() > secondContactTime >datetime("2020-04-03T19:32:24")
return p, other
The above query will provide a response of Ahmad's contact and contact of a contact.
Now I am modifying the query to look like this
MATCH (p:Person)-[:HAS_MET*2]->(other)
WHERE p.id=1 and NOT (p)-[:HAS_MET]->(other)
return other, p
In this query how do I access timestamp property of HAS_MET relationship?