题解 | #21年8月份练题总数#

21年8月份练题总数

https://www.nowcoder.com/practice/b8f30b239b454ed490367b53ea95607d

select did_cnt, question_cnt from (select
    count(distinct device_id) as did_cnt,
    count(question_id) as question_cnt,
    (case when date like "2021-08%" then "2021-08" else "其他"end) as mouth 
    from question_practice_detail
group by mouth having mouth like "2021-08") as question;

不用where的写法

全部评论

相关推荐

09-24 21:38
golang
点赞 评论 收藏
分享
爱睡觉的冰箱哥:你是我今晚见过的最美的牛客女孩
点赞 评论 收藏
分享
牛客30771517...:SQL注入这一块
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务