

{"id":340,"date":"2021-12-07T11:20:33","date_gmt":"2021-12-07T10:20:33","guid":{"rendered":"https:\/\/project.inria.fr\/tcypher\/?page_id=340"},"modified":"2021-12-07T11:20:33","modified_gmt":"2021-12-07T10:20:33","slug":"most-recent-likes","status":"publish","type":"page","link":"https:\/\/project.inria.fr\/tcypher\/most-recent-likes\/","title":{"rendered":"Most recent likes"},"content":{"rendered":"<p>Return a person\u2019s most recent like on a post and the elapsed time between the post and the like.<\/p>\n<p><a href=\"https:\/\/project.inria.fr\/tcypher\/files\/2021\/12\/query_4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-311 aligncenter\" src=\"https:\/\/project.inria.fr\/tcypher\/files\/2021\/12\/query_4-1024x576.png\" alt=\"\" width=\"462\" height=\"260\" srcset=\"https:\/\/project.inria.fr\/tcypher\/files\/2021\/12\/query_4-1024x576.png 1024w, https:\/\/project.inria.fr\/tcypher\/files\/2021\/12\/query_4-300x169.png 300w, https:\/\/project.inria.fr\/tcypher\/files\/2021\/12\/query_4-768x432.png 768w, https:\/\/project.inria.fr\/tcypher\/files\/2021\/12\/query_4-150x84.png 150w, https:\/\/project.inria.fr\/tcypher\/files\/2021\/12\/query_4.png 1280w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/a><\/p>\n<h4>T-Cypher<\/h4>\n<p><strong>RIGHT_SLICE <\/strong>2010-01-01T08:00:00Z <strong>ON R<\/strong><\/p>\n<p><strong>MATCH<\/strong> (p1:Person)-[l:likes]-&gt;(p2:Post)<\/p>\n<p><strong>RETURN<\/strong> p2,<strong> ELAPSED_TIME<\/strong>(p2@T, l@T)<\/p>\n<p><strong>ORDER BY <\/strong>START(l@T)<strong> LIMIT <\/strong>1<\/p>\n<h4>Cypher<\/h4>\n<p>MATCH (p1:`Person`)-[l:`likes`]-&gt;(p2:`Post`) WHERE l.tEnd &gt;= 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<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Return a person\u2019s 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]-&gt;(p2:Post) RETURN p2, ELAPSED_TIME(p2@T, l@T) ORDER BY START(l@T) LIMIT 1 Cypher MATCH (p1:`Person`)-[l:`likes`]-&gt;(p2:`Post`) WHERE l.tEnd &gt;= 1262332800000 RETURN p2, myFunctions.elapsed_time([p2.tStart, p2.tEnd], [l.tStart, l.tEnd]) AS `ELAPSED_TIME(p2@T,l@T)`\u2026<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/project.inria.fr\/tcypher\/most-recent-likes\/\"><span>Continue reading<\/span><i class=\"crycon-right-dir\"><\/i><\/a> <\/p>\n","protected":false},"author":2118,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-340","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/project.inria.fr\/tcypher\/wp-json\/wp\/v2\/pages\/340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/project.inria.fr\/tcypher\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/project.inria.fr\/tcypher\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/project.inria.fr\/tcypher\/wp-json\/wp\/v2\/users\/2118"}],"replies":[{"embeddable":true,"href":"https:\/\/project.inria.fr\/tcypher\/wp-json\/wp\/v2\/comments?post=340"}],"version-history":[{"count":1,"href":"https:\/\/project.inria.fr\/tcypher\/wp-json\/wp\/v2\/pages\/340\/revisions"}],"predecessor-version":[{"id":341,"href":"https:\/\/project.inria.fr\/tcypher\/wp-json\/wp\/v2\/pages\/340\/revisions\/341"}],"wp:attachment":[{"href":"https:\/\/project.inria.fr\/tcypher\/wp-json\/wp\/v2\/media?parent=340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}