把时间设置date类型,其中
select count(*),year(b.date),month(b.date) ,day(b.date) from person as b group by year(b.date),Month(b.date), day(b.date) order by b.date desc
查询结果

原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/database/5029.html
把时间设置date类型,其中
select count(*),year(b.date),month(b.date) ,day(b.date) from person as b group by year(b.date),Month(b.date), day(b.date) order by b.date desc
查询结果

原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/database/5029.html