Database Reference
In-Depth Information
Example 27: Below is a programmer defined PL/SQL function to determine y raised
to the power x :
12.8.5 Aggregation Functions
SQL provides several aggregate functions to provide summarized view of data. Some
commonly used aggregate (group) functions are described in Figure 12-11 :
Note:
1.
SUM, AVG, STDDEV and VARIANCE work with numeric
values.
2.
For MAX and MIN, the DISTINCT option is irrelevant.
3.
COUNT works with the DISTINCT option always, except for
the case where COUNT (*) or COUNT(1) is used.
Figure 12-11. Commonly Used SQL Aggregate Functions
Example 28: How many courses are offered?
Note: The second statement is preferred to the first, since it is more efficient.
 
Search WWH ::




Custom Search