2017-08-26 03:36:42 +08:00
|
|
|
MATCH (person:Person {id:"21990232559429"})-[:KNOWS]-(:Person)<-[:HAS_CREATOR]-(post:Post)-[:HAS_TAG]->(tag:Tag)
|
2017-09-01 21:39:32 +08:00
|
|
|
WHERE post.creationDate >= 1335830400000 AND post.creationDate < 1345830400000
|
2017-08-26 03:36:42 +08:00
|
|
|
OPTIONAL MATCH (tag)<-[:HAS_TAG]-(oldPost:Post)-[:HAS_CREATOR]->(:Person)-[:KNOWS]-(person)
|
|
|
|
WHERE oldPost.creationDate < 1335830400000
|
|
|
|
WITH tag, post, size(collect(oldPost)) AS oldPostCount
|
|
|
|
WHERE oldPostCount=0
|
|
|
|
RETURN
|
|
|
|
tag.name AS tagName,
|
|
|
|
size(collect(post)) AS postCount
|
|
|
|
ORDER BY postCount DESC, tagName ASC
|
|
|
|
LIMIT 10;
|