forked from ldbc/ldbc_snb_interactive_v1_impls
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from nevermore3/replace_ic11_with_go
replace ic11 with go
- Loading branch information
Showing
1 changed file
with
1 addition
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1 @@ | ||
MATCH (person:Person)-[:KNOWS*1..2]-(friend:Person) | ||
WHERE id(person) == $personId AND not(id(person)==id(friend)) | ||
WITH DISTINCT friend | ||
MATCH (friend:Person)-[workAt:WORK_AT]->(company:Organisation)-[:IS_LOCATED_IN]->(:Place {name:$countryName}) | ||
WHERE workAt.workFrom < $workFromYear | ||
RETURN | ||
toInteger(substr(id(friend), 2)) AS personId, | ||
friend.Person.firstName AS personFirstName, | ||
friend.Person.lastName AS personLastName, | ||
company.Organisation.name AS organizationName, | ||
workAt.workFrom AS organizationWorkFromYear | ||
ORDER BY organizationWorkFromYear ASC, personId ASC, organizationName DESC | ||
LIMIT 10 | ||
GO 1 TO 2 STEPS FROM $personId OVER KNOWS WHERE KNOWS._dst != $personId YIELD distinct KNOWS._dst AS friendId | GO FROM $-.friendId OVER WORK_AT WHERE WORK_AT.workFrom < $workFromYear YIELD $-.friendId AS friendId, $^.Person.firstName AS firstName, $^.Person.lastName AS lastName, WORK_AT.workFrom AS workFrom, WORK_AT._dst AS orgId| GO FROM $-.orgId OVER IS_LOCATED_IN WHERE $$.Place.name == $countryName YIELD toInteger(substr($-.friendId, 2)) AS personId, $-.firstName AS personFirstName, $-.lastName AS personLastName, $^.Organisation.name AS organizationName, $-.workFrom AS organizationWorkFromYear | ORDER BY $-.organizationWorkFromYear ASC, $-.personId ASC, $-.organizationName DESC | LIMIT 10 |