rpbouman.blogspot.com.es - Roland Bouman's blog

Description: Progamming, databases, Business Intelligence, MySQL, JavaScript, SQL SAP HANA

Example domain paragraphs

Programming - Databases - Analytics

select sum (SalesAmount) as SumOfSalesAmount , count (*) as RowCount from SalesYearMonth The example uses two aggregate functions , SUM() and COUNT() . It returns a result like this: SumOfSalesAmount RowCount 109,846,381.43 38 Two things are happening here: Even though there are multiple rows in the SalesYearMonth table, the result consists of just one row. In other words, a collection of source rows have been aggregated into fewer (in this case, only one) result row. The functions have caclculated a value

Nowadays, many SQL implementations offer some form of aggregate string concatenation function. Being an aggregate function, it has the effect concatenating values of a group of rows into a single string.