diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 667073f3..98aa3552 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -1704,12 +1704,6 @@ monthly 0.9 - - https://docs.firebolt.io/godocs/sql_reference/functions-reference/array/reduce.html - 2023-10-06 - monthly - 0.9 - https://docs.firebolt.io/godocs/sql_reference/commands/access-control/drop-login.html 2023-10-06 @@ -1776,4 +1770,4 @@ monthly 0.8 - \ No newline at end of file + diff --git a/docs/sql_reference/functions-reference/array/reduce.md b/docs/sql_reference/functions-reference/array/reduce.md deleted file mode 100644 index 4f7b3c17..00000000 --- a/docs/sql_reference/functions-reference/array/reduce.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -layout: default -title: REDUCE -description: Reference material for REDUCE function -grand_parent: SQL functions -parent: Array functions -great_grand_parent: SQL reference ---- - -# REDUCE - -Applies an aggregate function on the elements of the array and returns its result. The name of the aggregation function is passed as a string in single quotes - for example: `'max'`, `'sum'`. - -## Syntax -{: .no_toc} - -```sql -REDUCE(, ) -``` - -## Parameters -{: .no_toc} - -| Parameter | Description | Supported input types | -| :--------- | :------------------------------------------------- | :----------| -| `` | The name of an aggregation function in the form of a quoted string. | Any [aggregation function](../aggregation/) | -| `` | The array to aggregate. | `ARRAY` | - -## Return Types -Same as the element data type of the input array - -## Examples -{: .no_toc} - -```sql -SELECT - REDUCE('max', [ 1, 2, 3, 6 ]) AS levels; -``` - -**Returns**: `6` - -When using aggregation functions that take a constant as a parameter, the parameter should be specified after the function name in parentheses. This example below uses `REDUCE` with the `APPROX_PERCENTILE` function, which requires a percentile as a parameter. - -```sql -SELECT - REDUCE('approx_percentile(0.3)', [ 1, 2, 3, 4, 5, 6 ]) AS levels; -``` -**Returns**: `2.5` diff --git a/docs/sql_reference/functions-reference/functions-glossary.md b/docs/sql_reference/functions-reference/functions-glossary.md index 6ad79b1e..e98f7412 100644 --- a/docs/sql_reference/functions-reference/functions-glossary.md +++ b/docs/sql_reference/functions-reference/functions-glossary.md @@ -122,7 +122,6 @@ All Firebolt functions in alphabetical order. | [RADIANS](./numeric/radians.md) | Converts degrees to radians as a `REAL` value. | Numeric | | [RANDOM](./numeric/random.md) | Returns a pseudo-random unsigned value greater than 0 and less than 1 of type `DOUBLE PRECISION`. | Numeric | | [RANK](./window/rank.md) | Rank the current row within the requested window with gaps. | Window | -| [REDUCE](./array/reduce.md) | Applies an aggregate function on the elements of the array and returns its result. | Array | | [REGEXP_EXTRACT](./string/regexp-extract.md) | Returns the first match of a pattern within the input expression. If the pattern does not match, returns NULL. | String | | [REGEXP_EXTRACT_ALL](./string/regexp-extract-all.md) | Returns an array that contains all matches of a pattern within the given input expression. If the pattern does not match, returns an empty array. | String | | [REGEXP_LIKE](./string/regexp-like.md) | Checks whether a text pattern matches a regular expression string. Returns 0 if it doesn’t match, or 1 if it matches. | String | @@ -155,4 +154,4 @@ All Firebolt functions in alphabetical order. | [UPPER](./string/upper.md) | Converts the input string to uppercase characters. | String | | [URL_DECODE](./string/url_decode.md) | Decodes percent-encoded characters and replaces them with their binary value. | String | | [URL_ENCODE](./string/url_encode.md) | Encodes all characters that are not unreserved using percent-encoding. | String | -| [VERSION](./conditional-and-miscellaneous/version.md) | Returns the version number information for the Firebolt engine. | Conditional & miscellaneous | \ No newline at end of file +| [VERSION](./conditional-and-miscellaneous/version.md) | Returns the version number information for the Firebolt engine. | Conditional & miscellaneous |