排名
用户解题统计
过去一年提交了
勋章 ①金银铜:在竞赛中获得第一二三名;②好习惯:自然月10天提交;③里程碑:解决1/2/5/10/20/50/100/200题;④每周打卡挑战:完成每周5题,每年1月1日清零。
错题集 数据思维刷题中答错的题目
| 模块 | 知识点 | 题目 | 你的答案 | 正确答案 | 操作 |
|---|---|---|---|---|---|
| 暂无错题,继续保持! | |||||
收藏
| 收藏日期 | 题目名称 | 解决状态 |
|---|---|---|
| 没有收藏的题目。 | ||
评论笔记
| 评论日期 | 题目名称 | 评论内容 | 站长评论 |
|---|---|---|---|
| 没有评论过的题目。 | |||
提交记录
| 提交日期 | 题目名称 | 提交代码 |
|---|---|---|
| 2026-06-12 | 招建银行信用卡中心客户挽留-电商平台分类  |
select mch_nm as merchant_name, case when mch_nm like "%拼多多%" or mch_nm like "%上海寻梦信息科技%"then '拼多多' when mch_nm like "%京东%"then '京东' when mch_nm like "%淘宝%"then '淘宝' when mch_nm like "%抖音%"then '抖音' when mch_nm like "%小红书%"then '小红书' else '其它' end platform from ccb_trx_rcd; |
| 2026-06-12 | 招建银行信用卡中心客户挽留-电商平台分类  |
select mch_nm as merchant_name, case when mch_nm like "拼多多" or mch_nm like "上海寻梦信息科技"then '拼多多' when mch_nm like "京东"then '京东' when mch_nm like "淘宝"then '淘宝' when mch_nm like "抖音"then '抖音' when mch_nm like "小红书"then '小红书' else '其它' end platform from ccb_trx_rcd; |
| 2026-06-12 | 登录天数分布  |
with t1 as( select usr_id, count(distinctDATE(login_time)) cnt from user_login_log where login_time >= DATE_SUB(current_date() , INTERVAL 180 DAY) group by usr_id order by cnt ) select sum(if(0 < cnt and cnt <6,1,0)) as days_1_to_5, sum(if(5 < cnt and cnt <11,1,0)) as days_1days_6_to_10_to_5, sum(if(10 < cnt and cnt <21,1,0)) as days_11_to_20, sum(if(20 < cnt,1,0)) as days_over_20 from t1 |
| 2026-06-12 | 登录天数分布  |
with t1 as( select usr_id, count(*) cnt from user_login_log where login_time >= DATE_SUB(current_date() , INTERVAL 180 DAY) group by usr_id order by cnt ) select sum(if(0 < cnt and cnt <6,1,0)) as days_1_to_5, sum(if(4 < cnt and cnt <11,1,0)) as days_1days_6_to_10_to_5, sum(if(9 < cnt and cnt <21,1,0)) as days_11_to_20, sum(if(20 < cnt,1,0)) as days_over_20 from t1 |
| 2026-06-12 | 滴滴出行订单分析(二)用户打车次数排名  |
with t1 as ( select cust_uid, count(*) cnt from didi_sht_rcd group by cust_uid ), t2 as (select * , rank()over(order by cnt desc,cust_uid asc) as row_cnt from t1 ) select * from t2 where row_cnt <= 10 |
| 2026-06-12 | 一线城市历年平均气温  |
select year(dt), cast(avg(if(city = 'beijing',tmp_h,null)) as decimal(4,2)) as '北京', cast(avg(if(city = 'shanghai',tmp_h,null)) as decimal(4,2)) as '上海', cast(avg(if(city = 'shenzhen',tmp_h,null)) as decimal(4,2)) as '深圳', cast(avg(if(city = 'guangzhou',tmp_h,null)) as decimal(4,2)) as '广州' from weather_rcd_china group by year(dt) |
| 2026-06-11 | 一线城市历年平均气温  |
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) |