题解 | #计算用户8月每天的练题数量#
计算用户8月每天的练题数量
http://www.nowcoder.com/practice/847373e2fe8d47b4a2c294bdb5bda8b6
#使用sql中的substring_index字符串截取函数
SELECT SUBSTRING_INDEX(date,"-",-1) as day,
count(question_id) as question_cnt
from question_practice_detail
where SUBSTRING_INDEX(SUBSTRING_INDEX(date,"-",2),"-",-1)="08"
group by day;