mysql 按照年统计数据并存到新表中

参考:https://blog.csdn.net/u013201439/article/details/78116575

CREATE TABLE count_year 
	SELECT YEAR(reqtime),COUNT(YEAR(reqtime)) FROM bjxj GROUP BY YEAR(reqtime)

相关推荐