개의 열(각 등급별로 하나씩)이 있는 하나의 행을 결과셋에 표시하도록 다음 쿼리를 다시 작
성하세요. 이때
5
개의 열 이름을
G
,
PG
,
PG
_
13
,
R
,
NC
_
17
로 지정합니다.
mysql> SELECT rating, count(*)
-> FROM film
-> GROUP BY rating;
+--------+----------+
| rating | count(*) |
+--------+----------+
| PG | 194 |
| G | 178 |
| NC-17 | 210 |
| PG-13 | 223 |
| R | 195 |
+--------+----------+
5 rows in set (0.00 sec)
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.