select substr(visit_day,1,7) aS visit_yyyymm, gubun, sum(visit_num)
from tab1
group by substr(visit_day,1,7), gubun
order by GUBUN,substr(visit_day,1,7)
년별통계
select substr(visit_day,1,4) as visit_yyyy, gubun, sum(visit_num)
from tab1
group by substr(visit_day,1,4), gubun
order by GUBUN,substr(visit_day,1,4)
'이카루스의 날개 > DB' 카테고리의 다른 글
Connect By Prior (0) | 2007.08.04 |
---|---|
첫 PL/SQL (내가 짠건 아니지만 ㅡㅡ;) (0) | 2007.07.24 |
RedHat9 + Oracle 10g (0) | 2007.06.26 |
오라클에서 한글이 ???로 깨져보임을 해결 (1) | 2007.06.13 |
DECODE와 GROUP BY 예시 (0) | 2007.06.07 |
댓글