▣ group by ( sum , min , max , count , avg )
페이지 정보

본문
▣ select * from notice;

① select writer,sum(hit) from notice group by writer; --writer 별 총 조회수

② select writer,min(hit) from notice group by writer; --writer 별 최저 조회수

③ select writer,max(hit) from notice group by writer; --writer 별 최고 조회수

④ select writer,avg(hit) from notice group by writer; --writer 별 총 조회수

⑤ select writer,count(*) from notice group by writer; --writer 별 총 작성수

⑥ select writer,count(*) from notice group by writer HAVING count(*) > 3; --group by 절에서 조건은 HAVING 이용

추천0 비추천0
- 이전글▣ order by ( asc , desc ) 23.04.14
- 다음글● 변환 함수 ( TO_CHAR , TO_DATE , TO_NUMBER ) 23.04.14
댓글목록
등록된 댓글이 없습니다.
