Home     SQL Basic     Contact Us     Site Map    

SQL BASIC

SQL SELECT

SQL WHERE

SQL DISTINCT

SQL AND

SQL OR

SQL NOT

SQL ORDER BY

SQL IN

SQL BETWEEN

SQL LIKE

SQL ALIAS

SQL AGGREGATE

>SQL COUNT

>SQL SUM

>SQL MAX

>SQL MIN

>SQL AVG

SQL GROUP BY

SQL HAVING

SQL INSERT

SQL UPDATE

SQL DELETE

SQL SELECT INTO

SQL CREATE DATABASE

SQL CREATE TABLE

SQL DROP TABLE

SQL DROP DATABASE

SQL CREATE INDEX

SQL PRIMARY KEY

SQL FOREIGN KEY

SQL ALTER TABLE

SQL TRUNCATE TABLE

SQL JOIN

SQL INNER JOIN

SQL OUTER JOIN

SQL CROSS JOIN

SQL UNION

SQL UNION ALL

SQL INTERSECT



SQL AGGREGATE

As we know that database contains a lot of data, therefore it is always hard to get the data summarized if the data size is huge.

Fortunately, SQL provide some aggregate functions to assist with the summarization of huge data.

SQL Aggregate Functions are useful when mathematical operations must be performed from a huge data .

SQL Aggregate Functions are:

COUNT- count a number of rows
SUM- return sum
MAX- return maximum
MIN- return minimum
AVG- return average

The WHERE clause can be used with the quries that use aggregate functions to specify a set of rows that will be included in the function calculation.

The syntax for the aggregate function clause is:

SELECT [FUNCTION] ( [COLUMN NAME] ) FROM [TABLE NAME]