深情的牛可乐
深情的牛可乐
全部文章
分类
归档
标签
去牛客网
登录
/
注册
深情的牛可乐的博客
全部文章
(共6篇)
题解 | 各个部门实际平均薪资和男女员工实际平均薪资
select department, round(ifnull(sum(normal_salary - dock_salary) / count(*) ,0) , 2)as average_actual_salary, round(ifnull(sum(case when staff_gender ...
2026-01-13
0
28
题解 | 统计每个产品的销售情况
with t1 as ( select p.product_id, round(sum(p.unit_price * o.quantity), 2) as total_sales, round(max(p...
2026-01-12
0
42
题解 | 统计用户从访问到下单的转化率
select t1.date, concat(round(ifnull(order_cnt,0)/visit_cnt * 100,1),'%') as cr from( select date_format(visit_time,'%Y-%m-%d') as date, count(distinct...
2026-01-12
0
27
题解 | 网易云音乐推荐(网易校招笔试真题)
select music_name from music where id in ( select distinct music_id from ( select * from music_likes where music_id not in (select music_id ...
2026-01-08
0
27
题解 | 最长连续登录天数
select user_id, max(cnt) as max_consec_days from( select user_id, count(*) over(partition by user_id, ndate) as cnt from( select user_id, date_sub(fda...
2026-01-07
0
23
题解 | 查询连续登陆的用户
select distinct user_id from( select user_id, date_sub(date_format(log_time, '%Y-%m-%d'), interval dense_rank() over(partition by user_id order by dat...
2026-01-07
0
26