Most recent likes

Return a person’s most recent like on a post and the elapsed time between the post and the like.

T-Cypher

RIGHT_SLICE 2010-01-01T08:00:00Z ON R

MATCH (p1:Person)-[l:likes]->(p2:Post)

RETURN p2, ELAPSED_TIME(p2@T, l@T)

ORDER BY START(l@T) LIMIT 1

Cypher

MATCH (p1:`Person`)-[l:`likes`]->(p2:`Post`) WHERE l.tEnd >= 1262332800000 RETURN p2, myFunctions.elapsed_time([p2.tStart, p2.tEnd], [l.tStart, l.tEnd]) AS `ELAPSED_TIME(p2@T,l@T)` ORDER BY myFunctions.start([l.tStart, l.tEnd]) LIMIT 1

Comments are closed.