acezen commented on issue #614:
URL:
https://github.com/apache/incubator-graphar/issues/614#issuecomment-2325930519
## LDBC SNB Cypher statements:
**Querying and Filtering**
- **bi-1**:
```cypher
/*
:params { datetime: datetime('2011-12-01T00:00:00.000') }
*/
MATCH (message:Message)
WHERE message.creationDate < $datetime
WITH count(message) AS totalMessageCountInt // this should be a subquery
once Cypher supports it
WITH toFloat(totalMessageCountInt) AS totalMessageCount
```
- **bi-2**:
```cypher
MATCH (tag:Tag)-[:HAS_TYPE]->(:TagClass {name: $tagClass})
// window 1
OPTIONAL MATCH (message1:Message)-[:HAS_TAG]->(tag)
WHERE $date <= message1.creationDate
AND message1.creationDate < $date + duration({days: 100})
WITH tag, count(message1) AS countWindow1
// window 2
OPTIONAL MATCH (message2:Message)-[:HAS_TAG]->(tag)
WHERE $date + duration({days: 100}) <= message2.creationDate
AND message2.creationDate < $date + duration({days: 200})
WITH
tag,
countWindow1,
count(message2) AS countWindow2
```
- **bi-3**:
```cypher
/*
:params { tagClass: 'MusicalArtist', country: 'Burma' }
*/
MATCH
(:Country {name: $country})<-[:IS_PART_OF]-(:City)<-[:IS_LOCATED_IN]-
(person:Person)<-[:HAS_MODERATOR]-(forum:Forum)-[:CONTAINER_OF]->
(post:Post)<-[:REPLY_OF*0..]-(message:Message)-[:HAS_TAG]->(:Tag)-[:HAS_TYPE]->(:TagClass
{name: $tagClass})
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]