Analaytical Function-Pravin
Analaytical Function-Pravin
PRAVIN R
Analytical Functions or Windowing Functions or OLAP
(online analytical processing)function were introduced in
Oracle8i.
They compute aggregate values based on groups of data.
Probably the easiest way to understand analytical functions
is to start by looking at aggregate functions.
An aggregate function, as the name suggests, aggregates
data from several rows into a single result row.
SELECT deptno,sal,
COUNT(*) OVER (PARTITION BY deptno)
AS amount_by_dept
FROM vin;
The LISTAGG analytic function was introduced in Oracle 11g
Release 2, making it very easy to aggregate strings. The nice
thing about this function is it also allows us to order the
elements in the concatenated list. If you are using 11g Release
2 you should use this function for string aggregation.