memgraph/tests/public_benchmark/ldbc/test_cases/queries/query_2.cyp
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
520 B
Plaintext

MATCH (:Person {id:"17592186052613"})-[:KNOWS]-(friend:Person)<-[:HAS_CREATOR]-(message)
WHERE message.creationDate <= 1354060800000 AND (message:Post OR message:Comment)
RETURN
friend.id AS personId,
friend.firstName AS personFirstName,
friend.lastName AS personLastName,
message.id AS messageId,
CASE exists(message.content)
WHEN true THEN message.content
ELSE message.imageFile
END AS messageContent,
message.creationDate AS messageDate
ORDER BY messageDate DESC, toInt(messageId) ASC
LIMIT 20;