I have a Item node, which can be LIKED by a User node, and what I'm trying to achieve is:
- List all unique Item nodes that were liked by a User, sorted by the time of LIKE
- For each Item node listed above, also list the User node that most recently liked that Item node
This is the query I'm trying to use:
MATCH (i:Item)<-[like:LIKES]-(u:User)
WITH i, like, u, COUNT(u) as u_count
ORDER BY like.created DESC LIMIT 1
RETURN i, like.created, u, u_count;
However, this query only lists the first Item node. Any suggestions?