From 33b69b5894f1e60de2e4187c6f927d6bdbc45aa3 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Wed, 12 Feb 2025 20:12:01 -0500 Subject: [PATCH] docs: reduce verbosity of aggregate functions --- docs/references/api/aggregate_functions.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/references/api/aggregate_functions.rst b/docs/references/api/aggregate_functions.rst index 8fe1168ce..da41d170d 100644 --- a/docs/references/api/aggregate_functions.rst +++ b/docs/references/api/aggregate_functions.rst @@ -3,13 +3,11 @@ Aggregate Functions ################### -Aggregate functions allow you to summarize data by performing calculations across groups of rows. For instance, if you have an ``orders`` table that has an ``amount`` column, you could use an aggregate function to get the sum of the ``amount`` column, either for all rows, or for each group of rows that share specific values, for instance all rows that share the same ``order_date``. +PostgREST supports the following aggregate functions: ``avg()``, ``count()``, ``max()``, ``min()``, and ``sum()``. Please refer to the `section on aggregate functions in the PostgreSQL documentation `_ for a detailed explanation of these functions. .. note:: Aggregate functions are *disabled* by default in PostgREST, as without appropriate safeguards, aggregate functions can create performance problems. See :ref:`db-aggregates-enabled` for further details. -PostgREST supports the following aggregate functions: ``avg()``, ``count()``, ``max()``, ``min()``, and ``sum()``. Please refer to the `section on aggregate functions in the PostgreSQL documentation `_ for a detailed explanation of these functions. - To use an aggregate function, you append the function to a value in the ``select`` parameter, like so: .. code-block:: bash @@ -28,7 +26,7 @@ With the above query, PostgREST will return a single row with a single column na You can use multiple aggregate functions by just adding more columns with aggregate functions to the ``select`` parameter. -To group by other columns, you simply add those columns to the ``select`` parameter. For instance: +To group by other columns, you add those columns to the ``select`` parameter. For instance: .. code-block:: bash