所以我有一大堆选票进入投票系统。我想显示我在任何一天有多少票。但我也想然后,显示每天的票数并吐出他们在哪一天投票,即 24k 票在 05/06/12,27k 票在 06/06/12
SELECT count(*) AS count
FROM results
GROUP BY DAY(datesubmitted), YEAR(datesubmitted), MONTH(datesubmitted)
ORDER BY DAY(datesubmitted) DESC, YEAR(datesubmitted) DESC, MONTH(datesubmitted) DESC
是我的查询,我尝试添加类似
DAY(FROM_UNIXTIME(datesubmitted)) 作为 order_day
但这只是抛出一个我觉得有趣的空值,因为我希望查询失败,因为没有任何外部。