What is this Site!!

All about Real time requirements in Orale Stay Tune!!

Tuesday, January 22, 2008

What are AGGREGATE FUNCTIONS?



>>>Previous>>>



FUNCTIONS : These functions operate over a set of values.They are also known as aggregate functions


MAX(): A function used find maximum value among the given values.

SQL > SELECT MAX(SAL) FROM EMP;

MAX(SAL)
---------
5000

MIN(): It returns minimun of the values in a column.

SQL > SELECT MIN(HIREDATE) FROM EMP;

MIN(HIRED
---------
17-DEC-80


AVG(): Gives the average of values in a column.

SQL >SELECT AVG(SAL) FROM EMP;

AVG(SAL)
----------
2073.21429



SUM(): Sum of the values in a column


SQL >SELECT SUM(SAL) FROM EMP;

SUM(SAL)
----------
29025



COUNT(*): Gives number of columns in a table.


SQL >SELECT COUNT(*) FROM DUAL;

COUNT(*)
----------
1

SQL >SELECT COUNT(*) FROM EMP;

COUNT(*)
----------
14



COUNT(): Gives no of not null ENTRIE (VALUES) in that column.


SQL >SELECT COUNT(COMM) FROM EMP;

COUNT(COMM)
-----------
4


SQL >SELECT COUNT(DISTINCT JOB) FROM EMP;

COUNT(DISTINCTJOB)
------------------
5


Explanation: Using DISTICT, duplicate values can be suppressed.




>>>Next>>>


2 comments:

12345 said...

Nice blog, thanks For sharing this informative article.
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Oracle Fusion Financials Online Training
Big Data and Hadoop Training In Hyderabad

Anonymous said...

Such a nice blog, I really like what you write in this blog, I also have some relevant Information about Best HR Training In Hyderabad | Hr training institute in Hyderabad! if you want more information.
Oracle Fusion HCM Online Training
Oracle Fusion Financials Online Training