[Programmers] SQL(GROUP BY) - 고양이와 개는 몇 마리 있을까

DMIS·2022년 3월 2일
0

SQL

목록 보기
15/48
post-thumbnail

문제

풀이

  • group by 절을 사용하였다.
  • 고양이(cat)가 개(dog)보다 먼저 조회되도록 order by 절을 사용하였다.
select animal_type, count(animal_type) as count from animal_ins
group by animal_type
order by animal_type
profile
Data + Math

0개의 댓글