Lateral
Lateral
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Lateral的博客
全部文章
(共102篇)
题解 | 用户购买次数前三
select uid, count(step) as cnt from user_client_log where step='order' group by uid order by row_number() over(partit...
2025-03-24
0
26
题解 | 用户购买次数前三
select uid, count(step) as cnt from user_client_log where step='order' group by uid order by row_number() over(partition by uid order by count(step) a...
2025-03-24
0
22
题解 | 下单最多的商品
select u.product_id, count(u.step) as cnt from user_client_log u left join product_info p on u.product_id=p.product_id where u.step='order' group by u...
2025-03-24
0
18
题解 | 统计快递从创建订单到发出间隔时长
select round(avg(timestampdiff(minute,e.create_time,a.out_time)/60),3) as time from express_tb e left join exp_action_tb a on e.exp_number=a.exp_numbe...
2025-03-24
0
23
题解 | 统计快递运输时长
select t.exp_type, round(avg(t.time)/3600,1) as time from (select e.exp_type, timestampdiff(second,a.out_time,a.in_time) a...
2025-03-24
0
28
题解 | 查询产生理赔费用的快递信息
select e.exp_number, e.exp_type, c.claims_cost from express_tb e left join exp_cost_tb c on e.exp_number=c.exp_number where c.claims_cost is not null ...
2025-03-24
0
26
题解 | 完成员工考核试卷突出的非领导员工
select t4.emp_id, t4.emp_level, t4.tag as exam_tag from (select t1.emp_id, t2.emp_level, t3.tag, t1.exam_id, t1.submit_time-t1.start_tim...
2025-03-24
0
26
题解 | 淘宝店铺的实际销售额与客单价
select sum(s.sales_num*g.goods_price) as sales_total, sum(s.sales_num*g.goods_price)/count(distinct s.user_id) as per_trans from sales_tb s left join ...
2025-03-24
0
26
题解 | 短视频直播间晚上11-12点之间各直播间的在线人数
select u.room_id, r.room_name, count(distinct u.user_id) as user_count from user_view_tb u left join room_info_tb r on u.room_id...
2025-03-24
0
25
题解 | 被重复观看次数最多的3个视频
select t.cid, sum(t.pv) as pv, row_number() over(order by sum(t.pv) desc,c.release_date desc) as rk from (select p.cid, ...
2025-03-24
0
38
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页