[Oracle/오라클] 그룹함수 - COUNT, SUM, AVG, MAX, MIN, ROWS , + OVER, group by, having
MIN, MAX select min(ename), max(ename), min(hiredate), max(hiredate) from emp; 예제 테이블 SELECT * FROM TB_GRADE; SELECT CLASS_CD, MAX(KOR) KOR, MAX(ENG) ENG, MAX(MAT) MAT FROM TB_GRADE GROUP BY CLASS_CD; SELECT CLASS_CD, STUDENT_NO, STUDENT_NM, KOR, SUM(KOR) OVER(PARTITION BY CLASS_CD) AS KOR_SUM, MAX(KOR) OVER(PARTITION BY CLASS_CD) AS KOR_MAX FROM TB_GRADE ORDER BY CLASS_CD, STUDENT_NO; 1) GROUP ..
2021. 4. 17.