select day(date) as day,count(question_id) as question_cnt from question_practice_detail where date like'2021-08%' group by date
日期函数
day(date):获取到date的天,
聚合函数
count(),聚合函数不能出现在where当中
like 通配符匹配,因为需要获取到8月的相关数据,%代表任意长度的字符串
group by 分组
select day(date) as day,count(question_id) as question_cnt from question_practice_detail where date like'2021-08%' group by date
日期函数
day(date):获取到date的天,
聚合函数
count(),聚合函数不能出现在where当中
like 通配符匹配,因为需要获取到8月的相关数据,%代表任意长度的字符串
group by 分组