Tuesday, 9 October 2012

Lesson 12 : Aggregate Functions


Aggregate Functions or GROUP functions


Aggregate or Group functions are built-in oracle database functions that  return one value for the entire group of rows.


The following are Aggregate Functions that can be used with GROUP BY clause


1)      Count(* or any column)  - Number of rows


2)      Max()   - Largest number among all rows of numeric field


3)      Min()  -  Smallest number among all rows of numeric field


4)      Avg()   - Average of given numeric field/column


5)       Sum(numeric colmun)    -  Sum of given  numeric field/column

2 comments:

  1. Hello Sir, I hope for "MAX" and "MIN" aggregate functions we can use any data type- rte? we will get the value for even varchar2 data type- rte?

    ReplyDelete
  2. Yes Arun. We can use it. But Numeric and date datatype only give meaningful results.

    ReplyDelete