From 4efa3670541ba0261c669b8afb648c9ede181996 Mon Sep 17 00:00:00 2001 From: Soeren Wolfers Date: Fri, 29 Mar 2024 11:08:32 +0000 Subject: [PATCH 1/3] Update aggregates.md --- docs/sql/aggregates.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sql/aggregates.md b/docs/sql/aggregates.md index d0712034a47..5853797d1a9 100644 --- a/docs/sql/aggregates.md +++ b/docs/sql/aggregates.md @@ -142,11 +142,11 @@ as the first argument. | Function | Equivalent | |:---|:---| -| `mode() WITHIN GROUP (ORDER BY sort_expression)` | `mode(sort_expression)` | -| `percentile_cont(fraction) WITHIN GROUP (ORDER BY sort_expression)` | `quantile_cont(sort_expression, fraction)` | -| `percentile_cont(fractions) WITHIN GROUP (ORDER BY sort_expression)` | `quantile_cont(sort_expression, fractions)` | -| `percentile_disc(fraction) WITHIN GROUP (ORDER BY sort_expression)` | `quantile_disc(sort_expression, fraction)` | -| `percentile_disc(fractions) WITHIN GROUP (ORDER BY sort_expression)` | `quantile_disc(sort_expression, fractions)` | +| `mode() WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `mode(column ORDER BY column [(ASC|DESC)])` | +| `percentile_cont(fraction) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_cont(column, fraction ORDER BY column [(ASC|DESC)])` | +| `percentile_cont(fractions) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_cont(column, fractions ORDER BY column [(ASC|DESC)])` | +| `percentile_disc(fraction) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_disc(column, fraction ORDER BY column [(ASC|DESC)])` | +| `percentile_disc(fractions) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_disc(column, fractions ORDER BY column [(ASC|DESC)])` | ## Miscellaneous Aggregate Functions From c79876f0371ba11239a5622afa003353ab8705d6 Mon Sep 17 00:00:00 2001 From: Soeren Wolfers Date: Fri, 29 Mar 2024 11:27:55 +0000 Subject: [PATCH 2/3] Update aggregates.md --- docs/sql/aggregates.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sql/aggregates.md b/docs/sql/aggregates.md index 5853797d1a9..ba520102309 100644 --- a/docs/sql/aggregates.md +++ b/docs/sql/aggregates.md @@ -142,11 +142,11 @@ as the first argument. | Function | Equivalent | |:---|:---| -| `mode() WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `mode(column ORDER BY column [(ASC|DESC)])` | -| `percentile_cont(fraction) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_cont(column, fraction ORDER BY column [(ASC|DESC)])` | -| `percentile_cont(fractions) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_cont(column, fractions ORDER BY column [(ASC|DESC)])` | -| `percentile_disc(fraction) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_disc(column, fraction ORDER BY column [(ASC|DESC)])` | -| `percentile_disc(fractions) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_disc(column, fractions ORDER BY column [(ASC|DESC)])` | +| `mode() WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `mode(column ORDER BY column [(ASC|DESC)])` | +| `percentile_cont(fraction) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_cont(column, fraction ORDER BY column [(ASC|DESC)])` | +| `percentile_cont(fractions) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_cont(column, fractions ORDER BY column [(ASC|DESC)])` | +| `percentile_disc(fraction) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_disc(column, fraction ORDER BY column [(ASC|DESC)])` | +| `percentile_disc(fractions) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_disc(column, fractions ORDER BY column [(ASC|DESC)])` | ## Miscellaneous Aggregate Functions From 531e2dc01bcc958af8775090de6e6532c03aa6ae Mon Sep 17 00:00:00 2001 From: Soeren Wolfers Date: Fri, 29 Mar 2024 11:40:28 +0000 Subject: [PATCH 3/3] Update aggregates.md --- docs/sql/aggregates.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/sql/aggregates.md b/docs/sql/aggregates.md index ba520102309..4abdb0756b7 100644 --- a/docs/sql/aggregates.md +++ b/docs/sql/aggregates.md @@ -142,11 +142,12 @@ as the first argument. | Function | Equivalent | |:---|:---| -| `mode() WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `mode(column ORDER BY column [(ASC|DESC)])` | -| `percentile_cont(fraction) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_cont(column, fraction ORDER BY column [(ASC|DESC)])` | -| `percentile_cont(fractions) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_cont(column, fractions ORDER BY column [(ASC|DESC)])` | -| `percentile_disc(fraction) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_disc(column, fraction ORDER BY column [(ASC|DESC)])` | -| `percentile_disc(fractions) WITHIN GROUP (ORDER BY column [(ASC|DESC)])` | `quantile_disc(column, fractions ORDER BY column [(ASC|DESC)])` | +| mode() WITHIN GROUP (ORDER BY column [(ASC|DESC)]) | mode(column ORDER BY column [(ASC|DESC)]) | +| percentile_cont(fraction) WITHIN GROUP (ORDER BY column [(ASC|DESC)]) | quantile_cont(column, fraction ORDER BY column [(ASC|DESC)]) | +| percentile_cont(fractions) WITHIN GROUP (ORDER BY column [(ASC|DESC)]) | quantile_cont(column, fractions ORDER BY column [(ASC|DESC)]) | +| percentile_disc(fraction) WITHIN GROUP (ORDER BY column [(ASC|DESC)]) | quantile_disc(column, fraction ORDER BY column [(ASC|DESC)]) | +| percentile_disc(fractions) WITHIN GROUP (ORDER BY column [(ASC|DESC)]) | quantile_disc(column, fractions ORDER BY column [(ASC|DESC)]) | + ## Miscellaneous Aggregate Functions