马国成好样的
马国成好样的
全部文章
分类
归档
标签
去牛客网
登录
/
注册
马国成好样的的博客
全部文章
(共51篇)
题解 | 商品销售排名
select product_name,p from (select user_client_log.product_id ,product_name , count(*) *price p from user_client_log left join product_info on user_cl...
2025-07-08
0
43
题解 | 商品价格排名
select product_id,product_name,type,price from ( select product_id,product_name,type,price from (select * , rank() over(partition by type order by pr...
2025-07-08
0
37
题解 | 用户购买次数前三
select uid , count(trace_id) cnt from user_client_log where step = 'order' group by 1 order by 2 desc limit 3
2025-07-08
0
26
题解 | 下单最多的商品
select product_id ,count(product_id) cnt from user_client_log where step = 'order' group by 1 order by 1 limit 1
2025-07-08
0
33
题解 | 统计快递从创建订单到发出间隔时长
select round(avg(timestampdiff(minute,create_time,out_time)/60),3) time from express_tb left join exp_action_tb on express_tb.exp_number = exp_action_...
2025-07-08
0
48
题解 | 统计快递运输时长
select exp_type ,round(avg(timestampdiff(minute,out_time,in_time)/60),1) time from express_tb left join exp_action_tb on express_tb.exp_number = exp...
2025-07-08
0
41
题解 | 查询产生理赔费用的快递信息
select exp_cost_tb.exp_number ,exp_type ,claims_cost from exp_cost_tb left join express_tb on exp_cost_tb.exp_number = express_tb.exp_number where c...
2025-07-08
0
37
题解 | 淘宝店铺的实际销售额与客单价
select sum(sales_num*goods_price ) sales_total ,sum(sales_num*goods_price )/count(distinct user_id) per_trans from sales_tb s left join goods_tb g on ...
2025-07-08
1
40
题解 | 短视频直播间晚上11-12点之间各直播间的在线人数
select u.room_id ,room_name ,count(distinct user_id) user_count from user_view_tb u left join room_info_tb r on u.room_id = r.room_id where u.in_time ...
2025-07-08
0
42
题解 | 查询成绩
select count(*) from (select sid,avg(score) from SC group by 1 having avg(score) >60 and count(cid) = 3)a
2025-07-08
0
26
首页
上一页
1
2
3
4
5
6
下一页
末页