AGGREGATE FUNCTION (집계함수)는 여러 COLUMN 혹은 TABLE 전체 COLUMN에서 하나의 특정 결과값을 반환하는 SQL 문법입니다.
SELECT COUNT(column)
FROM tablename
WHERE condition;
SELECT SUM(column)
FROM tablename
WHERE condition;
SELECT AVG(column)
FROM tablename
WHERE condition;
SELECT MIN(column)
FROM tablename
WHERE condition;
SELECT MAX(column)
FROM tablename
WHERE condition;
SELECT FIRST(column)
FROM tablename
WHERE condition;
SELECT LAST(column)
FROM tablename
WHERE condition;
가정)
SELECT COUNT(NAME)
FROM testTABLE
WHERE NAME LIKE '%김%';
SELECT SUM(AGE)
FROM testTABLE
WHERE AGE > 10;
SELECT AVG(AGE)
FROM testTABLE
WHERE AGE > 10;
SELECT MIN(AGE)
FROM testTABLE
WHERE AGE > 10;
SELECT MAX(AGE)
FROM testTABLE
WHERE AGE < 50;
SELECT FIRST(NAME)
FROM testTABLE
WHERE NAME LIKE '%김%';
SELECT LAST(NAME)
FROM testTABLE
WHERE NAME LIKE '%김%';