日期:2014-05-16 浏览次数:20463 次
SET character_set_connection=utf8, character_set_results=utf8? ;
?
?
?
select
??? concat('2011-',m),
??? sum(
??????? case when DAYOFMONTH(a.date)=m
??????? then? a.AccessCount else 0 end
?????? )? ,
?a.url,b.accessSource
from
?? pplive_dacweb.dac_resin_access a, pplive_dacweb.dac_resin_access_url b,
??? (
??????? select 1 m
??????? union all select 2
??????? union all select 3
??????? union all select 4
??????? union all select 5
??????? union all select 6
??????? union all select 7
??????? union all select 8
??????? union all select 9
??????? union all select 10
??????? union all select 11
??????? union all select 12
??? ) c
where a.url = b.url
group by??
??? m,a.url
order by a.url