纯粹爱刷题294408346
纯粹爱刷题294408346
全部文章
分类
归档
标签
去牛客网
登录
/
注册
纯粹爱刷题294408346的博客
全部文章
(共25篇)
题解 | 商品价格排名
SELECT product_id,product_name,type,price FROM(SELECT product_id, product_name, type, price, rank() over(partition by type or...
2025-04-01
0
50
题解 | 用户购买次数前三
SELECT uid, cast(sum(if(step='order',1,0)) AS SIGNED) AS cnt FROM user_client_log GROUP BY uid ORDER BY sum(if(step='order',1,0)) DESC,uid L...
2025-03-30
0
39
题解 | 下单最多的商品
SELECT product_id, sum(if(step='order',1,0)) AS cnt FROM user_client_log GROUP BY product_id ORDER BY sum(if(step='order',1,0)) DESC LIMIT 1...
2025-03-30
0
31
题解 | 统计快递从创建订单到发出间隔时长
SELECT round(avg(timestampdiff(minute,b.create_time,a.out_time)/60),3) AS time FROM exp_action_tb AS a LEFT JOIN express_tb AS b ON a.exp_number=...
2025-03-29
0
44
题解 | 统计快递运输时长
WITH exp_type AS( SELECT exp_number, exp_type FROM express_tb ) --选取express的type SELECT b.exp_type, ROUND(avg(TIMESTA...
2025-03-29
0
47
题解 | 查询产生理赔费用的快递信息
SELECT a.exp_number, a.exp_type, b.claims_cost FROM express_tb AS a LEFT JOIN exp_cost_tb AS b ON a.exp_number=b.exp_number WHERE b.claim...
2025-03-28
0
44
题解 | 完成员工考核试卷突出的非领导员工
WITH avg_score AS( SELECT exam_id, avg(score) AS mean_score FROM exam_record GROUP BY exam_id ), avg_cost_time AS( SE...
2025-03-28
0
37
题解 | 淘宝店铺的实际销售额与客单价
SELECT SUM(a.sales_num*b.goods_price) AS sales_total, SUM(a.sales_num*b.goods_price)/count(distinct a.user_id) AS per_trans FROM sales_tb AS ...
2025-03-26
0
33
题解 | 短视频直播间晚上11-12点之间各直播间的在线人数
WITH shift_user AS( SELECT room_id, user_id, in_time, HOUR(date_add(in_time ,interval 12 hour)) MOD 24 AS shift_...
2025-03-26
0
39
题解 | 支付间隔平均值
SELECT cast(avg(abs(# 根据题目意思,先abs后avg timestampdiff(second, order_log.logtime, select_log.logtime) )) AS signed) AS g...
2025-03-17
0
48
首页
上一页
1
2
3
下一页
末页