题解 | #21年8月份练题总数#
21年8月份练题总数
https://www.nowcoder.com/practice/b8f30b239b454ed490367b53ea95607d
select count(DISTINCT device_id) as did_cnt,count(question_id) as question_cnt from question_practice_detail where date>='2021-08-01' and date <='2021-08-31'; 从question_practice_detail表中 计算用户总数(可能有重复的) as做为别名did_cnt count(question_id)总数 as 作为别名question_cnt where条件判定 'date>='2021-08-01' and 'date <='2021-08-31';