memgraph/tests/public_benchmark/ldbc/test_cases/queries/query_11.oc
florijan 21550d3bb1 LDBC queries checked
Summary:
- checked existing queries and added new ones
- minor changes to LDBC setup

Reviewers: teon.banek, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D737
2017-09-02 10:36:02 +02:00

14 lines
501 B
Plaintext

MATCH (person:Person {id:"30786325583618"})-[:KNOWS*1..2]-(friend:Person)
WHERE not(person=friend)
WITH DISTINCT friend
MATCH (friend)-[worksAt:WORK_AT]->(company:Organisation)-[:IS_LOCATED_IN]->(:Place {name:"Laos"})
WHERE worksAt.workFrom < 2010
RETURN
friend.id AS friendId,
friend.firstName AS friendFirstName,
friend.lastName AS friendLastName,
company.name AS companyName,
worksAt.workFrom AS workFromYear
ORDER BY workFromYear ASC, tointeger(friendId) ASC, companyName DESC
LIMIT 20;