I have two data from two different relations (FOLLOWS
, LIKES
).
FOLLOWS
relation contains startedFollowingOn
and LIKES
relation contains likedOn
(both return epoch values).
What I want to achieve is sort the result on the basis of startedFollowingOn
and likedOn
.
MATCH (n1 : User {username : "abhishekm"})-[r : FOLLOWS | LIKES]-(n2)
RETURN
DISTINCT COLLECT ({
event : type(r),
startedFollowingOn : r.startedFollowingOn,
likedOn : r.likedOn})[0..10]
AS data LIMIT 10;