此处可以用 like 关键字进行过滤查询:
SELECT
count(DISTINCT(device_id)) did_cnt,
count(question_id) question_cnt
from question_practice_detail
where date like '%2021-08%'