在找内推的mmmm
在找内推的mmmm
全部文章
分类
归档
标签
去牛客网
登录
/
注册
在找内推的mmmm的博客
全部文章
(共7篇)
题解 | 查询成绩
甚至都不需要联表 select count(*) from ( SELECT COUNT(DISTINCT sid) num FROM SC s GROUP BY sid HAVING AVG(s.score) > 60) t
2025-02-27
0
46
题解 | 用户购买次数前三
注意下单是order select distinct uid,cnt from( select uid,count(pay_method) cnt,rank()over(order by count(pay_method) desc) ranking from user_client_log whe...
2025-02-26
0
28
题解 | 查询连续入住多晚的客户信息?
select user_id,g.room_id,room_type,datediff(checkout_time,checkin_time) as days from checkin_tb c left join guestroom_tb g on c.room_id=g.room_id wher...
2025-02-24
0
33
题解 | 获取指定客户每月的消费额
__注意不要漏了消费类型 t_type='1' select date_format(t_time,'%Y-%m') time,sum(t_amount) total from trade t join customer c on t.t_cus=c.c_id where c_name='Tom' ...
2025-02-24
2
41
题解 | 分析客户逾期情况
select pay_ability,concat(round(count(overdue_days)/count(c.pay_ability)*100,1),'%') overdue_ratio from loan_tb l left join customer_tb c on l.c...
2025-02-24
0
39
题解 | 最长连续登录天数
select user_id, CAST(MAX(consec_day) AS SIGNED) AS max_consec_days from( select user_id, @pre_day:=@to_day, @to_day:=fdate, @count:=i...
2025-02-24
0
52
题解 | 最长连续登录天数
select user_id, CAST(MAX(consec_day) AS SIGNED) AS max_consec_days from( select user_id, @pre_day:=@to_day, @to_day:=fdate, @count:=i...
2025-02-24
0
39