▣ 집계형 함수
select avg(sal) as [평균] from emp
-- 평균
select avg(isnull(cmm.0)) as [커미션] from emp
--
select sum(sal)/count(sal) as [평균]from emp
-- 총합계 / 개수
select max(sal) as [최고급여] from emp
-- 최고값
select min(sal) as [최저급여] from emp
-- 최저값
'Dev Story > dev' 카테고리의 다른 글
리눅스에 SDK 설치하기 (0) | 2007.02.28 |
---|---|
VMware Server Download (0) | 2007.02.27 |
mssql - datename, datepart, dateadd, datediff, convert, cast (0) | 2007.01.31 |
mssql - round, sqrt, square, power, abs, ceiling, floor (0) | 2007.01.31 |
mssql - upper, lower, len, substring, left, right, reverse, replace, stuff (0) | 2007.01.31 |