BDI302cXuất hiện trong 1 đề thi
Which query calculates the weighted shortest path using distance in Neo4j?
Các lựa chọn
AMATCH (a)-[:TO]->(b) RETURN path
BMATCH p = shortestPath((from)-[:TO*]→(to)) WITH REDUCE(dist = 0, rel in rels(p) | dist + toInt(rel.dist)) AS distance RETURN path, distance
CMATCH (n)-[r]-() RETURN REDUCE(dist=0, r in r | dist + 1)
DMATCH p=(a)-[:TO*]->(b) RETURN reduce(p)