<aside> 🧙♂️ 소그룹 간의 소계를 계산하는 ROLLUP 함수
</aside>
select t.orig_yyyy 창단년도,
t.team_name 팀명,
count(*) 선수수,
round(avg(p.height), 1) 평균키
from team t
join player p on t.team_id = p.team_id
group by rollup(t.orig_yyyy, t.team_name);
t.orig_yyyy, t.team_name을 group 별로t.orig_yyyy만 group별로()select t.orig_yyyy 창단년도,
t.team_name 팀명,
count(*) 선수수,
round(avg(p.height), 1) 평균키
from team t
join player p on t.team_id = p.team_id
group by rollup**((**t.orig_yyyy, t.team_name**))**;
t.orig_yyyy, t.team_name 을 group 별로() 하나GROUP BY ROLLUP (A, B, C)