일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- 접속ip
- 주소 좌표변환
- mysql trigger
- http https
- 아이폰키보드
- 폐업자에 대한 업종등의 정보내역
- jquery selectbox change
- 2개 테이블
- 첫주 및 마지막주 날짜 전체 포함
- Oracle
- partition by
- 컴퓨터 드라이버
- mysql
- extundelete
- KOSA
- ajax async
- String 배열
- checkbox 값처리
- ant path pattern
- 한국소프트웨어산업협회
- String[]
- remote ip
- update
- multipart
- 서브쿼리
- TM128
- ajax 동기방식처리
- group by max
- eclipse hotdeploy
- map api v3
Archives
- Today
- Total
하은양 믿음군 효실맘 호홍홍집s
Mysql union all이용한 시간단위 값가져오기 편법 ㅋㅋ 본문
select a.*, (select ifnull(count(rsv_id),0) cnt from TB_RSV where OBJ_TYPE = 'GRP' and OBJ_ID = 1 and RSTATUS in ('POK') and DATE_FORMAT(stime, '%Y%m%d%H') = concat('20160225',a.team_h) ) rsvcnt from ( select 1 AS num, '09:00' AS team_hour, '09' AS team_h union all select 2 AS num, '10:00' AS team_hour, '10' AS team_h union all select 3 AS num, '11:00' AS team_hour, '11' AS team_h union all select 4 AS num, '12:00' AS team_hour, '12' AS team_h union all select 5 AS num, '13:00' AS team_hour, '13' AS team_h union all select 6 AS num, '14:00' AS team_hour, '14' AS team_h union all select 7 AS num, '15:00' AS team_hour, '15' AS team_h union all select 8 AS num, '16:00' AS team_hour, '16' AS team_h union all select 9 AS num, '17:00' AS team_hour, '17' AS team_h ) a ;
'가벼운 배움 > MySql' 카테고리의 다른 글
Oracle 임의 키생성을 Mysql로 처리 (0) | 2016.12.21 |
---|---|
2개 Table Join 해서 한 테이블의 값을 UPDATE (0) | 2016.04.07 |
프로시져이용한 달력 Table만들기 (0) | 2016.02.25 |
jsp 이용 RSV_ID 구하기(mysq 시퀀스사용하기) (0) | 2016.02.17 |
like에 변수 합치기 (0) | 2015.11.25 |