Thanks for helping.
A follow up question to this.
Suppose we edited the dataset like this:
{
set: [
{
“uid”: “:A",
“name”: “A”,
“dgraph.type”: “node”,
“links”: [
{
“uid”: ":B”,
“name”: “B”,
“dgraph.type”: “node”,
“links|timestamp”: 1
},
{
“uid”: “:B",
“name”: “B”,
“dgraph.type”: “node”,
“links|timestamp”: 2
},
{
“uid”: ":C”,
“name”: “C”,
“dgraph.type”: “node”,
“links|timestamp”: 3
},
{
“uid”: “:D",
“name”: “D”,
“dgraph.type”: “node”,
“links|timestamp”: 4
},
{
“uid”: ":B”,
“name”: “B”,
“dgraph.type”: “node”,
“links|timestamp”: 5
},
{
“uid”: “:C",
“name”: “C”,
“dgraph.type”: “node”,
“links|timestamp”: 6
}
]
},
{
“uid”: ":A”,
“name”: “A”,
“dgraph.type”: “node”,
“links”: [
{
“uid”: “:B",
“name”: “B”,
“dgraph.type”: “node”,
“links|timestamp”: 10
},
{
“uid”: ":B”,
“name”: “B”,
“dgraph.type”: “node”,
“links|timestamp”: 3
},
{
“uid”: “:C",
“name”: “C”,
“dgraph.type”: “node”,
“links|timestamp”: 1
}]
},
{
“uid”: ":B”,
“name”: “B”,
“dgraph.type”: “node”,
“links”: [
{
“uid”: “_:C”,
“name”: “C”,
“dgraph.type”: “node”,
“links|timestamp”: 7
}
]
}
}]}
Corresponding to this dataset,
The output I want :
q :[
{A,B,10}, {A,C,6},{A,D,4},{B,C,7)
]
This is similar to the below query in neo4j if I give start=1 and end=19.
Match (n:node)-[r:links]-(m:node)
Where {start} <= r.timestamp<= {end}
Return n.name,m.name,max(r.timestamp)
How do I approach this?