May 2019
Intermediate to advanced
546 pages
12h 41m
English
This part of the query specifies a list of one or more fields, separated by commas, that are used to group the retrieved results. A GROUP BY clause is used with aggregate functions to summarize data. With this function, you are able to roll up query results, rather than having to process the individual records in your code.
The results will include extra subtotal rows for the grouped data when you group the results with the functions GROUP BY rollup or GROUP BY cube:
SELECT ShippingCountry, SUM(AnnualRevenue) totalRevenue FROM Account GROUP BY ShippingCountry
This query gives you the total annual revenues from the accounts, grouped by the shipping ...
Read now
Unlock full access