存几分期许
存几分期许
全部文章
分类
归档
标签
去牛客网
登录
/
注册
存几分期许的博客
全部文章
(共167篇)
题解 | 每个商品的销售总额
select product_name, total_sales, row_number() over (partition by category order by total_sales desc, pro2.product_id) as category_rank from ( sel...
2025-08-07
0
28
题解 | 统计所有课程参加培训人次
with t as ( select info_id, staff_id, course, case when course like '%course1%' then 1 else 0 end as course1, case when course like '%cour...
2025-08-06
0
24
题解 | 查询连续入住多晚的客户信息?
select user_id, room_id, room_type, days from ( select user_id, b.room_id, room_type, datediff(checkout_time, checkin_time) as days from ...
2025-08-06
0
22
题解 | 获取指定客户每月的消费额
select date_format(t_time, '%Y-%m') as time, sum(t_amount) as total from trade t join customer c on t.t_cus=c.c_id where year(t_time)=2023 and c_name=...
2025-08-06
0
24
题解 | 分析客户逾期情况
select pay_ability, concat(round(sum(case when overdue_days is not null then 1 else 0 end)/count(1)*100, 1), '%') as overdue_ratio from loan_tb loan ...
2025-08-06
0
29
题解 | 最长连续登录天数
select user_id, max(consec_days) as max_consec_days from ( select user_id, rn, count(1) as consec_days from ( select fdate, u...
2025-08-06
0
26
题解 | 每个月Top3的周杰伦歌曲
select month,rn as ranking, song_name, cnt as play_pv from ( select month(fdate) as month, play.song_id, count(1) as cnt, song_name, ro...
2025-08-06
0
24
题解 | #查询连续登陆的用户#
WITH t1 AS (SELECT l.user_id, DATE_FORMAT(log_time, '%Y-%m-%d') AS log_date, ROW_NUMBER...
2024-08-17
0
143
题解 | #统计各岗位员工平均工作时长#
SELECT post, ROUND(AVG(work_hours), 3) AS work_hours FROM (SELECT staff_id, TIME_TO_SEC(TIMEDIFF(last_clockin, first_clockin)) / 3600 AS work_hours FR...
2024-08-17
0
129
题解 | #每个商品的销售总额#
SELECT product_name, total_sales, ROW_NUMBER() OVER (PARTITION BY category ORDER BY total_sales DESC ) AS category_rank FROM (SELECT name AS product_n...
2024-08-17
0
135
首页
上一页
8
9
10
11
12
13
14
15
16
17
下一页
末页