我有一个桌子用户我需要按日期选择登录总数。 最佳答案 按日期分组并使用sum汇总所有用户:select year, month, day, sum(loginCount) from user group by year, month, day