연산 관련 함수 참고 사이트
Numeric Functions
mariadb.com
abs( 숫자 ), 절댓값 출력
select abs(123), abs(-123);

ceil(실수), 올림
select ceil(4.4), ceil(4.5), ceil(4.6);

floor(실수), 내림
select floor(5.6), floor(6.7);

round(실수), 반올림
select round(4.5), round(4.3);

truncate(숫자, 버릴 구간), 숫자 버림
select truncate(999.999, 0);

select truncate(999.999, -2);

power(숫자, 제곱), 제곱
select power(2,2);

%, mod(숫자, 숫자)
select 5 % 2, mod(5,2);

greatest(숫자 1, 숫자 2,....), 최댓값 출력
select greatest( 100, 101, 102 );

greatest 응용
부서가 10번인 사원 중에서 급여가 2000이상인 사원 급여 출력
select greatest(sal, 2000) from emp where deptno= 10;

least(숫자 1, 숫자 2,....), 최솟값 출력
select least( 100, 101, 102 );
