[SQL] 카테고리별로 기간합 구하기
1 2 3 4 5 6 7 8 9 10 11 select cate_fullpath, count(case when yyyy = 2019 then 1 end) as y2019, count(case when yyyy = 2020 then 1 end) as y2020, count(case when yyyy = 2019 and mm between 5 and 10 then 1 end) as may_y2019, count(case when yyyy = 2020 and mm between 5 and 10 then 1 end) as may_y2020, count(case when yyyy = 2019 and mm between 2 and 4 then 1 end) as feb_y2019, count(case when yyyy = 2020 and mm between 2 and 4 then 1 end) as feb_y2020 from navi....