서브쿼리를 이용한 초간단 통계 쿼리 예제
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;
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
7 | Database | [mysql] MySql DB/테이블 사이즈 확인을 위한 쿼리 | hooni | 2019.11.22 | 764 |
6 | Database | [mysql] MacOS에 MySQL 설치, 설정, 암호 재설정 | hooni | 2017.12.15 | 1594 |
5 | Database | [mysql] error while loading shared libraries: libmysqlclient.so.10: | hooni | 2003.04.23 | 12724 |
4 | Database | [mysql] ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. | hooni | 2017.12.15 | 1351 |
3 | Database | [mysql] DB->Text, Text->DB 변환 | hooni | 2003.04.23 | 12205 |
2 | Database | [mysql] CPU 점유율이 높을 때 확인할 내용 | hooni | 2015.08.26 | 6747 |
1 | Database | SQL JOIN 정리 (Inner Join & Outer Join) | hooni | 2019.11.22 | 1921 |