반응형
    
    
    
  SELECT ex_no, from_unixtime(`reg_date`,'%Y%m%d%H') as hh, 
COUNT(ex_no) AS `cnt_reg_date`
FROM expose_log
Where from_unixtime(reg_date,'%Y%m%d%H') >= '04050406'
AND from_unixtime(reg_date,'%Y%m%d%H') <= '04050723'
GROUP BY from_unixtime(`reg_date`,'%Y%m%d%H'), `ex_no`
ORDER BY from_unixtime(`reg_date`,'%Y%m%d%H')
                    
        COUNT(ex_no) AS `cnt_reg_date`
FROM expose_log
Where from_unixtime(reg_date,'%Y%m%d%H') >= '04050406'
AND from_unixtime(reg_date,'%Y%m%d%H') <= '04050723'
GROUP BY from_unixtime(`reg_date`,'%Y%m%d%H'), `ex_no`
ORDER BY from_unixtime(`reg_date`,'%Y%m%d%H')
반응형
    
    
    
  '데이타베이스' 카테고리의 다른 글
| MYSQL unix time을 date 형식으로 보기 쿼리 (0) | 2008.10.10 | 
|---|---|
| MYSQL DB 사용자 추가 (0) | 2008.10.10 | 
| MYSQL root 패스워드 바꾸기 (0) | 2008.10.10 | 
| MYSQL group by 의 예 (0) | 2008.10.09 | 
| MYSQL 백업과 복구 상세 설명 (0) | 2008.10.09 | 
| MYSQL DB 원격 접속 (0) | 2008.10.09 | 
| MYSQL 중복 체크한 쿼리 (0) | 2008.10.09 | 
| MYSQL Table 복사 (0) | 2008.10.09 |