Skip to content

Commit

Permalink
Fix IC10 (#59)
Browse files Browse the repository at this point in the history
* Fix IC10

Fix IC10

fix

fix

* small change

* small fix
  • Loading branch information
czpmango authored Nov 29, 2022
1 parent a15499b commit ba371c5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions nebula/queries/interactive-complex-10.ngql
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ WITH person, city, friend, datetime(friend.Person.birthday) as birthday
WHERE (birthday.month==$month AND birthday.day>=21) OR
(birthday.month==($month%12)+1 AND birthday.day<22)
WITH DISTINCT friend AS f, city AS c, person AS p
OPTIONAL MATCH (f)<-[e1:POST_HAS_CREATOR]-(post:Post)
OPTIONAL MATCH (p)-[e2:HAS_INTEREST]->()<-[:HAS_TAG]-(post)
WITH f AS friend,
c AS city,
count(e1) AS postCount,
count(e2) AS commonPostCount
OPTIONAL MATCH (f)<-[:POST_HAS_CREATOR]-(post:Post)
WITH f AS friend, c AS city, collect(post) AS posts, count(post) AS postCount, p AS person
UNWIND posts AS post
OPTIONAL MATCH (person)-[e:HAS_INTEREST]->()<-[:HAS_TAG]-(post)
WITH friend, city, postCount, count(e) AS commonPostCount
RETURN toInteger(substr(id(friend), 2)) AS personId,
friend.Person.firstName AS personFirstName,
friend.Person.lastName AS personLastName,
Expand Down

0 comments on commit ba371c5

Please sign in to comment.