排名
用户解题统计
过去一年提交了
勋章 ①金银铜:在竞赛中获得第一二三名;②好习惯:自然月10天提交;③里程碑:解决1/2/5/10/20/50/100/200题;④每周打卡挑战:完成每周5题,每年1月1日清零。
收藏
| 收藏日期 | 题目名称 | 解决状态 |
|---|---|---|
| 没有收藏的题目。 | ||
评论笔记
| 评论日期 | 题目名称 | 评论内容 | 站长评论 |
|---|---|---|---|
| 没有评论过的题目。 | |||
提交记录
| 提交日期 | 题目名称 | 提交代码 |
|---|---|---|
| 2026-03-25 | 登录天数分布  |
with t1 as( select distinct usr_id,date(login_time) dt from user_login_log ), t2 as (select usr_id,count(usr_id) cnt from t1 where dt>= date_sub(now(),interval 181 day) group by usr_id) select sum(case when cnt between 1 and 5 then 1 else 0 end )days_1_to_5, sum(case when cnt between 6 and 10 then 1 else 0 end ) days_6_to_10, sum(case when cnt between 11 and 20 then 1 else 0 end ) days_11_to_20, sum(case when cnt>20 then 1 else 0 end) days_over_20 from t2 |