排名

用户解题统计

过去一年提交了

勋章 ①金银铜:在竞赛中获得第一二三名;②好习惯:自然月10天提交;③里程碑:解决1/2/5/10/20/50/100/200题;④每周打卡挑战:完成每周5题,每年1月1日清零。

收藏

收藏日期 题目名称 解决状态
没有收藏的题目。

评论笔记

评论日期 题目名称 评论内容 站长评论
没有评论过的题目。

提交记录

提交日期 题目名称 提交代码
2025-08-25 渣男腰子可真行,端午中秋干不停 
select * 
from cmb_usr_trx_rcd
where usr_id = '5201314520' and
(date(trx_time) between '2024-06-08' and '2024-06-10' or
date(trx_time) between '2024-09-15' and '2024-09-17' )
2025-08-25 渣男腰子可真行,端午中秋干不停 
select * 
from cmb_usr_trx_rcd
where usr_id = '5201314520' and
date(trx_time) between '2024-06-08' and '2024-06-10' or
date(trx_time) between '2024-09-15' and '2024-09-17'
2025-08-25 渣男腰子可真行,端午中秋干不停 
select * from cmb_usr_trx_rcd limit 5;
2025-08-25 通勤、午休、临睡个时间段活跃人数分布 
SELECT
    COUNT(DISTINCT CASE
        WHEN TIME(login_time) BETWEEN '07:30:00' AND '09:30:00'
             OR TIME(login_time) BETWEEN '18:30:00' AND '20:30:00' THEN usr_id
    END) AS commute,
    COUNT(DISTINCT CASE
        WHEN TIME(login_time) BETWEEN '11:30:00' AND '14:00:00' THEN usr_id
    END) AS lunch_break,
    COUNT(DISTINCT CASE
        WHEN TIME(login_time) BETWEEN '22:30:00' AND '23:59:59' THEN usr_id
        WHEN TIME(login_time) BETWEEN '00:00:00' AND '01:00:00' THEN usr_id
    END) AS bedtime
FROM
    user_login_log
WHERE
    login_time >= DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01')
    AND login_time < DATE_FORMAT(CURDATE(), '%Y-%m-01');
2025-08-25 条件过滤(3)Hour函数很给力,组合条件要仔细 
select * 
from cmb_usr_trx_rcd 
 where date (trx_time) between '2024-09-01' and '2024-09-30' and
 ((hour (trx_time) >=22) or(hour (trx_time)between 0 and 5 ) ) and
 usr_id = 5201314520
 order by trx_time asc
2025-08-25 条件过滤(3)Hour函数很给力,组合条件要仔细 
select * 
from cmb_usr_trx_rcd 
 where date (trx_time) between '2024-09-01' and '2024-09-30' and
 ((hour (trx_time) > 22) or(hour (trx_time)between 0 and 5 ) ) and
 usr_id = 5201314520
 order by trx_time asc
2025-08-25 条件过滤(3)Hour函数很给力,组合条件要仔细 
select * 
from cmb_usr_trx_rcd 
 where date (trx_time) between '2024-09-01' and '2024-09-30' and
 (hour (trx_time) > 22 orhour (trx_time)between 0 and 5 )and
 usr_id = 5201314520
 order by trx_time asc
2025-08-25 条件过滤(3)Hour函数很给力,组合条件要仔细 
select * 
from cmb_usr_trx_rcd 
 where date (trx_time) between '2024-09-01' and '2024-09-30' and
 (hour (trx_time) > 22 orhour (trx_time)between 0 and 5 )and
 usr_id = 5201314520
 order by trx_time
2025-08-25 条件过滤(3)Hour函数很给力,组合条件要仔细 
select * 
from cmb_usr_trx_rcd 
 where date (trx_time) between '2024-09-01' and '2024-09-30' and
 (hour (trx_time) > 22 orhour (trx_time)between 1 and 5 )and
 usr_id = 5201314520
 order by trx_time
2025-08-25 条件过滤(3)Hour函数很给力,组合条件要仔细 
select * 
from cmb_usr_trx_rcd 
 where date (trx_time) between '2024-09-01' and '2024-09-30' and
 (hour (trx_time) > 22 orhour (trx_time)between 1 and 5 )and
 usr_id = 5201314520
 order by trx_time asc
2025-08-25 条件过滤(3)Hour函数很给力,组合条件要仔细 
select * 
from cmb_usr_trx_rcd 
 where date (trx_time) between '2024-09-01' and '2024-09-30' and
 (hour (trx_time) > 22 orhour (trx_time)between 1 and 5 )and
 usr_id = 5201314520
2025-08-25 条件过滤(2)半夜活动有猫腻,Hour函数给给力 
select * 
from cmb_usr_trx_rcd 
whereusr_id = 5201314520 and
 date(trx_time) between '2024-09-01' and '2024-09-30'and
 hour(trx_time) between 1 and 5
2025-08-25 条件过滤(1)异地男友有异常,数分闺蜜来帮忙 
select * 
from cmb_usr_trx_rcd
where date(trx_time) between '2024-09-01' and '2024-09-30' and
usr_id = (5201314520)
2025-08-25 一线城市历年平均气温 
select year(dt) as Y
    ,cast(avg(case when city='beijing' then tmp_h else null end) as decimal(4,2)) as '北京'
    ,cast(avg(case when city='shanghai' then tmp_h else null end) as decimal(4,2)) as 上海
    ,cast(avg(case when city='shenzhen' then tmp_h else null end) as decimal(4,2)) as 深圳
    ,cast(avg(case when city='guangzhou' then tmp_h else null end) as decimal(4,2)) as 广州
from
    weather_rcd_china
where 
    year(dt) between 2011 and 2022
group by 
    year(dt)
2025-08-25 冬季下雪天数 
select city ,sum(con like '%雪%') 
from weather_rcd_china 
where month(dt) in (12,1,2)
group by city
2025-08-25 冬季下雪天数 
select city ,count(con like '%雪%')
from weather_rcd_china 
where month(dt) in (12,1,2)
group by city
2025-08-25 条件过滤(3)Hour函数很给力,组合条件要仔细 
select *
from cmb_usr_trx_rcd
where date(trx_time) between '2024-09-01' and '2024-09-30' and
(hour(trx_time) >=22)or
(hour(trx_time )between 0 and 5 )and
 usr_id = '5201314520'
order by trx_time
2025-08-25 条件过滤(3)Hour函数很给力,组合条件要仔细 
select *
from cmb_usr_trx_rcd
where date(trx_time) between '2024-09-01' and '2024-09-30'and
((hour(trx_time) >=22)or
(hour(trx_time )between 0 and 5 ))and
 usr_id = '5201314520'
order by trx_time
2025-08-25 条件过滤(3)Hour函数很给力,组合条件要仔细 
select * 
from cmb_usr_trx_rcd 
where usr_id = 5201314520and
date(trx_time) between '2024-09-01' and '2024-09-30' and
hour(trx_time) between '22:00:00' and '00:00:00' or
hour(trx_time) between '01:00:00' and '05:00:00'
2025-08-25 条件过滤(2)半夜活动有猫腻,Hour函数给给力 
select * 
from cmb_usr_trx_rcd 
where usr_id = 5201314520 and
date(trx_time) between '2024-09-01' and '2024-09-30'and
hour(trx_time) between '01:00:00' and '05:00:00'
order by trx_time asc