SELECT DATE_FORMAT(FROM_UNIXTIME(uCheckSPassTime),’%Y-%m-%d’) AS d ,COUNT(*) AS so_count FROM `bc_User`
WHERE CheckStates = 2
AND DATE_FORMAT(FROM_UNIXTIME(uCheckSPassTime),’%Y-%m-%d’) BETWEEN ‘2007-11-01’ AND ‘2007-11-30′
GROUP BY DATE_FORMAT(FROM_UNIXTIME(uCheckSPassTime),’%Y-%m-%d’)

SELECT DATE_FORMAT(FROM_UNIXTIME(uCheckSPassTime),’%Y-%m’) AS m ,COUNT(*) AS so_count FROM `bc_User`
WHERE CheckStates = 2
AND DATE_FORMAT(FROM_UNIXTIME(uCheckSPassTime),’%Y-%m’) BETWEEN ‘2007-11’ AND ‘2009-11′
GROUP BY DATE_FORMAT(FROM_UNIXTIME(uCheckSPassTime),’%Y-%m’)

By jack

Related Post

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

85 − 82 =