Team2) [DB] group by, having을 이용한 데이터 가공하기
[문제] 학생 테이블생성 1. 각 동아리의 총인원 출력 2. 각동아리의 평균점수 출력 3. 각 동아리중에서 평균이 40이상인 동아리만 출력 [테이블 생성하기] create table student( sid int primary key, -- 학생번호 sname varchar(20) not null, --학생이름 club varchar(30), --소속 클럽 score int default 0 --학생점수 ); [데이터 추가] insert into student values((select nvl(max(sid),0)+1 from student), '홍길동','미술부', 10); insert into student values((select nvl(max(sid),0)+1 from student), '임꺽정..
2022. 1. 25.