skambha commented on a change in pull request #28138: [SPARK-31366][DOCS][SQL] Add doc for the aggregation in SQL reference guide URL: https://github.com/apache/spark/pull/28138#discussion_r404474110
########## File path: docs/sql-ref-syntax-qry-aggregation.md ########## @@ -19,4 +19,16 @@ license: | limitations under the License. --- -**This page is under construction** + +An aggregate function operates on a group of rows and returns a single value. +Spark supports various aggregations. +Some examples of the common aggregation functions are <code>SUM</code>, <code>MIN</code>, <code>MAX</code> and <code>COUNT</code>. +There are a rich set of aggregate functions that can be used along with the +<code>GROUP BY</code> clause in <code>SELECT</code> queries. +Spark also supports advanced aggregations using the <code>CUBE</code>, <code>GROUPING SETS</code> and <code>ROLLUP</code> clauses in <code>GROUP BY</code>. + +The following sections describe the query syntax and usage for the different aggregation functions. +* [BUILT-IN AGGREGATE FUNCTIONS](sql-ref-functions-builtin-aggregate.html) +* [CUBE](sql-ref-syntax-qry-select-groupby.html) +* [GROUPING SETS](sql-ref-syntax-qry-select-groupby.html) +* [ROLLUP](sql-ref-syntax-qry-select-groupby.html) Review comment: That is a good question! The structure and organization of this page was decided in the parent PRs for the sql reference doc. IIUC, The intention is to point to the cube, grouping sets and rollup and this is already described in group by. So content wise we have the info in the group by page. But in terms of structure, it is easier to navigate to this from here, than from going to select and then group by page. It is more of a landing page to get to aggregation related functionality. I can combine the 3 (CUBE, ROLLUP, GROUPING SETS) into one bullet if that seems better? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
