From 95848c5e1358e36eaca005659a6bd7893fd7d62f Mon Sep 17 00:00:00 2001 From: "abby.huang" <78209557+abby-cyber@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:55:54 +0800 Subject: [PATCH] move std() sum() to aggregating functions (#2322) --- .../15.aggregating.md | 38 +++++++++++++++++++ .../16.type-conversion.md | 38 ------------------- 2 files changed, 38 insertions(+), 38 deletions(-) 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 02ce125728..ff86d1cb4d 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 @@ -287,6 +287,44 @@ nebula> LOOKUP ON player \ ``` +## std() + +std() 返回参数的总体标准差。 + +语法:`std()` + +- 返回类型:double。 + +示例: + +```ngql +nebula> MATCH (v:player) RETURN std(v.player.age); ++-------------------+ +| std(v.player.age) | ++-------------------+ +| 6.423895701687502 | ++-------------------+ +``` + +## sum() + +sum() 返回参数的和。 + +语法:`sum()` + +- 返回类型:与原参数相同。 + +示例: + +```ngql +nebula> MATCH (v:player) RETURN sum(v.player.age); ++-------------------+ +| sum(v.player.age) | ++-------------------+ +| 1698 | ++-------------------+ +``` + ## 聚合示例 ```ngql diff --git a/docs-2.0/3.ngql-guide/6.functions-and-expressions/16.type-conversion.md b/docs-2.0/3.ngql-guide/6.functions-and-expressions/16.type-conversion.md index 23dfb2c546..1a4e2433fe 100644 --- a/docs-2.0/3.ngql-guide/6.functions-and-expressions/16.type-conversion.md +++ b/docs-2.0/3.ngql-guide/6.functions-and-expressions/16.type-conversion.md @@ -150,41 +150,3 @@ nebula> YIELD hash(toLower("HELLO NEBULA")); +-------------------------------+ ``` - -## std() - -std() 返回参数的总体标准差。 - -语法:`std()` - -- 返回类型:double。 - -示例: - -```ngql -nebula> MATCH (v:player) RETURN std(v.player.age); -+-------------------+ -| std(v.player.age) | -+-------------------+ -| 6.423895701687502 | -+-------------------+ -``` - -## sum() - -sum() 返回参数的和。 - -语法:`sum()` - -- 返回类型:与原参数相同。 - -示例: - -```ngql -nebula> MATCH (v:player) RETURN sum(v.player.age); -+-------------------+ -| sum(v.player.age) | -+-------------------+ -| 1698 | -+-------------------+ -``` \ No newline at end of file