Introduction to Grouping Flashcards
1
Q
Which aggregate function allows you to add up the values of a column across rows?
A
The SUM aggregate function.
Example:
SELECT
SUM (AMOUNT) “Total Charges”,
SUM (RVU_TOTAL) “Total RVUs”
FROM V_ARPB_RVU_DATA
(7.7)
2
Q
Does the SUM aggregate function include NULL values?
A
No, NULL values are ignored.
7.7
3
Q
Are column aliases required when aggregating a column?
A
Yes.
See 7.7
4
Q
What clause allows you to specify the granularity or a query result, thereby reducing the granularity of a query?
A
The GROUP BY clause.
7.8
5
Q
What is the main benefit of reducing the granularity of your query result?
A
The reduced columns can be summarized.
7.9