Wednesday, January 6, 2010

Agregate Function

Agregate's function it specified statistic function on row that is sorted. 
Function that often been utilized:
a.       AVG  _ to look for average point
Instruction: SELECT AVG (column_name) FROM (table_name)
b.      MAX  _ to look for greatest point
Instruction: SELECT MAX (column_name) FROM (table_name)
c.       MIN  _ to look for point most little
Instruction: SELECT MIN (column_name) FROM (table_name)
d.      SUM  _ to account amount of a field
Instruction: SELECT SUM (column_name) FROM (table_name)
e.       COUNT  _ to account record's amount
Instruction: SELECT COUNT (column_name) FROM (table_name)

Example:
1.      Looking for SKS'S maximal point of college student table?
SELECT MAX (SKS) FROM is college student
2.      Looking for SKS'S average value of college student table?
SELECT AVG (SKS) FROM is college student
3.      Look for total SKS'S point of college student table?
SELECT SUM (SKS) FROM is college student
4.      Account total college student of college student table?
SELECT COUNT (kd_mahasiswa) FROM is college student
5.      Account total appreciative college student SKS is more than 50?
SELECT COUNT (kd_mahasiswa) FROM is WHERE SKS'S college student>50
6.      Account total college student that gets address at ‘ Yogyakarta ’?
SELECT COUNT (kd_mahasiswa) FROM is WHERE'S college student alamat= ’ Yogyakarta ’

To download material Agregate's function  can click herein

No comments:

Post a Comment