From 3321edd8706a996b8f258fe37729e06f8a386653 Mon Sep 17 00:00:00 2001 From: "abby.huang" <78209557+abby-cyber@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:39:07 +0800 Subject: [PATCH] Add-collect()-examples (#2321) --- .../15.aggregating.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs-2.0/3.ngql-guide/6.functions-and-expressions/15.aggregating.md b/docs-2.0/3.ngql-guide/6.functions-and-expressions/15.aggregating.md index 81b988684c9..02ce125728f 100644 --- a/docs-2.0/3.ngql-guide/6.functions-and-expressions/15.aggregating.md +++ b/docs-2.0/3.ngql-guide/6.functions-and-expressions/15.aggregating.md @@ -260,6 +260,31 @@ nebula> MATCH (n:player) \ | 25 | ["Joel Embiid", "Kyle Anderson"] | +-----+--------------------------------------------------------------------------+ ... + +nebula> GO FROM "player100" OVER serve \ + YIELD properties($$).name AS name \ + | GROUP BY $-.name \ + YIELD collect($-.name) AS name; ++-----------+ +| name | ++-----------+ +| ["Spurs"] | ++-----------+ + +nebula> LOOKUP ON player \ + YIELD player.age As playerage \ + | GROUP BY $-.playerage \ + YIELD collect($-.playerage) AS playerage; ++------------------+ +| playerage | ++------------------+ +| [22] | +| [47] | +| [43] | +| [25, 25] | ++------------------+ +... + ``` ## 聚合示例