memgraph/tests/public_benchmark/ldbc/test_cases/queries/query_9.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

15 lines
521 B
Plaintext

MATCH (:Person {id:"13194139542834"})-[:KNOWS*1..2]-(friend:Person)<-[:HAS_CREATOR]-(message)
WHERE message.creationDate < 1324080000000
RETURN DISTINCT
friend.id AS personId,
friend.firstName AS personFirstName,
friend.lastName AS personLastName,
message.id AS messageId,
CASE message.content IS not null
WHEN true THEN message.content
ELSE message.imageFile
END AS messageContent,
message.creationDate AS messageCreationDate
ORDER BY message.creationDate DESC, toInteger(message.id) ASC
LIMIT 20;