思路: 看到大家的答案千篇一律使用day也是醉了,我来个不一样的,使用dateFormat函数
select DATE_FORMAT(date,"%d") day,count(device_id) he
from question_practice_detail
where DATE_FORMAT(date,"%Y-%m") = '2021-08'
group by day
思路: 看到大家的答案千篇一律使用day也是醉了,我来个不一样的,使用dateFormat函数
select DATE_FORMAT(date,"%d") day,count(device_id) he
from question_practice_detail
where DATE_FORMAT(date,"%Y-%m") = '2021-08'
group by day