월별통계 (2009-01 ~ 2010-01)

SELECT 
  COUNT(*) as count, 
  to_char(created_date, 'YYYY-MM') as created_date 
FROM 
  table_name
WHERE 
  created_date>='2009-01-01' AND created_date<'2010-01-01'
GROUP BY 
  to_char(created_date, 'YYYY-MM');

 

 

 

 

일별통계 (2009-04-01 ~ 2009-04-30)

SELECT 
  COUNT(*) as count, 
  to_char(created_date, 'YYYY-MM-DD') as created_date 
FROM 
  table_name
WHERE 
  created_date>='2009-04-01' AND created_date<'2009-05-01'
GROUP BY 
  to_char(created_date, 'YYYY-MM-DD');









Posted by bloodguy
,