select left(convert(char(10),[Article_TimeDate],102),7) as 月份, count(*) as 数量
from [hdsource].[dbo].[article]
group by left(convert(char(10),[Article_TimeDate],102),7)
order by 1
统计年份: from [hdsource].[dbo].[article]
group by left(convert(char(10),[Article_TimeDate],102),7)
order by 1
select left(convert(char(10),[Article_TimeDate],102),4) as 年份, count(*) as 数量
from [hdsource].[dbo].[article]
group by left(convert(char(10),[Article_TimeDate],102),4)
order by 1
from [hdsource].[dbo].[article]
group by left(convert(char(10),[Article_TimeDate],102),4)
order by 1