[DB]데이터베이스 오라클 / SQL 함수/ 집계합수/숫자함수/문자열함수/날짜 함수/형변환 함수/ having/sum/avg/group by
havig 사용하기 직급(position)별로 pay 합과 평균 구하는데 ,직급이 과장인 사람만 출력 select position , sum(pay),avg(pay) from emp2 group by position having position ='과장'; -- select name hpage,instr(hpage,'/',-1) from professor; -- select name hpage,substr(hpage,instr(hpage,'/',-1)+1)"홈피주소" from professor where hpage is not null;