冷艳的西红柿刷牛客
冷艳的西红柿刷牛客
全部文章
分类
归档
标签
去牛客网
登录
/
注册
冷艳的西红柿刷牛客的博客
全部文章
(共111篇)
题解 | 电商平台想要了解不同商品在不同月份的销售趋势
#开始我想使用and year(s.sale_month)=2023 and month(s.sale_month)<7作为条件筛选的,但是函数的返回结果一直是NULL,添加了str_to_date(s.sale_month, "%Y-%m")之后还是不行,也不知道为什么,...
2025-08-26
0
29
题解 | 最受欢迎的top3课程
#注意函数date_add(release_date, interval 7 day)后面的day是不能加s的('days'), 还有就是timestampdiff() #直接使用minute不用second / 60不然不能通过 select cid, count(*) as pv...
2025-08-26
0
28
题解 | 更新员工信息表
SELECT EMPLOYEE_ID, POSITION, LAST_UPDATE_DT FROM ( SELECT EMPLOYEE_INFO.EMPLOYEE_ID, ( ...
2025-08-26
0
35
题解 | 未下单用户登陆渠道统计
#不使用group by和join而是窗口函数的写法 select channel, cnt from ( select channel, cnt, row_number() over(...
2025-08-26
0
36
题解 | 统计每个产品的销售情况
with sales_part as( select product_id, sum(monthly_quantity) * unit_price as total_sales, unit_price, sum(monthly_...
2025-08-25
0
34
题解 | 商品销售总额分布
select true_method, count(*) as cnt from ( select product_id, ( case ...
2025-08-25
0
22
题解 | 商品销售排名
select product_name, convert(sum((succ_fail) * price), signed) as total from ( select ucl.product_id, ( ...
2025-08-24
0
32
题解 | 商品价格排名
select product_id, product_name, type, price from ( with rank_product_info as( select product...
2025-08-24
0
41
题解 | 完成员工考核试卷突出的非领导员工
#注释是不使用窗口函数,直接使用group by和inner join完成 # select # emp_record.emp_id, # emp_record.emp_level, # tag # from # ( # select # ...
2025-08-24
0
25
题解 | 完成员工考核试卷突出的非领导员工
select emp_record.emp_id, emp_record.emp_level, tag from ( select emp_level, emi.emp_id, ...
2025-08-24
0
28
首页
上一页
3
4
5
6
7
8
9
10
11
12
下一页
末页