서브쿼리를 이용한 초간단 통계 쿼리 예제
SELECT SUM( DECODE(hope,1,1,0) hope1, DECODE(hope,2,1,0) hope2, DECODE(hope,3,1,0) hope3, DECODE(hope,4,1,0) hope4 ) FROM cist_app GROUP BY hope;
서브쿼리를 이용한 초간단 통계 쿼리 예제
SELECT SUM( DECODE(hope,1,1,0) hope1, DECODE(hope,2,1,0) hope2, DECODE(hope,3,1,0) hope3, DECODE(hope,4,1,0) hope4 ) FROM cist_app GROUP BY hope;