排名

用户解题统计

过去一年提交了

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

收藏

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

评论笔记

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

提交记录

提交日期 题目名称 提交代码
2026-04-13 基于共同兴趣爱好的餐厅推荐(1)-我吃过啥 
select 
    cust_uid, mch_nm 
from 
    mt_trx_rcd1 
where 
    cust_uid='MT10000'
group by
    cust_uid, mch_nm 
order by 2
2026-04-13 基于共同兴趣爱好的餐厅推荐(1)-我吃过啥 
select 
    cust_uid, mch_nm 
from 
    mt_trx_rcd1 
where 
    cust_uid='MT10020'
group by
    cust_uid, mch_nm 
order by 2
2026-04-13 基于共同兴趣爱好的餐厅推荐(1)-我吃过啥 
select distinct u1.cust_uid, u2.mch_nm 
 from (
 select a.cust_uid as user_a, b.cust_uid as user_b
 from mt_trx_rcd1 a 
 join mt_trx_rcd1 b on a.mch_nm = b.mch_nm and a.cust_uid != b.cust_uid
 group by a.cust_uid, b.cust_uid
 having count(distinct a.mch_nm)>=2
 ) sim
 join mt_trx_rcd1 u1 on u1.cust_uid = sim.user_a
 join mt_trx_rcd1 u2 on u2.cust_uid = sim.user_b
 where u2.mch_nm not in(
 select mch_nm from mt_trx_rcd1 where cust_uid = u1.cust_uid
 )
 union
select distinct u1.cust_uid, u2.mch_nm 
 from (
 select a.cust_uid as user_a, b.cust_uid as user_b
 from mt_trx_rcd1 a 
 join mt_trx_rcd1 b on a.mch_nm = b.mch_nm and a.cust_uid != b.cust_uid
 group by a.cust_uid, b.cust_uid
 having count(distinct a.mch_nm)>=2
 ) sim
 join mt_trx_rcd1 u1 on u1.cust_uid = sim.user_a
 join mt_trx_rcd1 u2 on u2.cust_uid = sim.user_b
 where u2.mch_nm not in(
 select mch_nm from mt_trx_rcd1 where cust_uid = u1.cust_uid
 ) 
 order by cust_uid, mch_nm;
2026-04-13 基于共同兴趣爱好的餐厅推荐(1)-我吃过啥 
select distinct u1.cust_uid, u2.mch_nm 
 from (
 select a.cust_uid as user_a, b.cust_uid as user_b
 from mt_trx_rcd1 a 
 join mt_trx_rcd1 b on a.mch_nm = b.mch_nm and a.cust_uid != b.cust_uid
 group by a.cust_uid, b.cust_uid
 having count(distinct a.mch_nm)>=2
 ) sim
 join mt_trx_rcd1 u1 on u1.cust_uid = sim.user_a
 join mt_trx_rcd1 u2 on u2.cust_uid = sim.user_b
 where u2.mch_nm not in(
 select mch_nm from mt_trx_rcd1 where cust_uid = u1.cust_uid
 );
2026-04-13 基于共同兴趣爱好的餐厅推荐(1)-我吃过啥 
select * from mt_trx_rcd1 limit 5;