GuaMiao
GuaMiao
全部文章
分类
归档
标签
去牛客网
登录
/
注册
GuaMiao的博客
全部文章
(共89篇)
题解 | #某店铺的各商品毛利率及店铺整体毛利率#
# 先将2021年10月以来,901店铺的信息找到 with t1 as ( select product_id, in_price from tb_product_info where shop_id = 901 ), t2 as ( # 找到2021-10及之后已...
2023-10-23
0
269
注意10月份的商城新用户意味着用户的首单时间在2021.10
# 先计算2021年10月平台的新用户的首单订单信息, # 此处新用户的定义是第一次下单时间在2021年10月份 with t1 as ( select b.uid, a.order_id, a.total_amount from tb_order_overall as a ...
2023-10-23
0
292
题解 | #2021年11月每天新用户的次日留存率
# 先计算每一天的活跃用户人数 with t1 as ( select uid, date_format(in_time, '%Y-%m-%d') as dt from tb_user_log union select uid, date_format(out_tim...
2023-10-23
0
273
题解 | #每天的日活数及新用户占比#
# 先计算每一天的活跃用户人数 with t1 as ( select uid, date_format(in_time, '%Y-%m-%d') as dt from tb_user_log union select uid, date_format(out_tim...
2023-10-22
0
226
题解 | #每个创作者每月的涨粉率及截止当前的总粉丝量#
# 找到2021年每个月哥哥视频的粉丝变化量以及是视频播放量 with t1 as ( select video_id, count(case when if_follow = 1 then uid end) as fan_add, count(case when if_follow...
2023-09-29
0
235
题解 | 使用子查询的方式找出属于Action分类的所有电影
select title, description from film where film_id in ( select a.film_id from film_category as a left join category as b on a.category_...
2023-09-12
0
341
题解 | #平均工资#
# 找出在职员工的薪资 with t1 as ( select emp_no, salary from salaries where to_date = '9999-01-01' ), # 找到最大,最小的工资是多少 t2 as ( select max(salar...
2023-09-12
0
327
题解 | #牛客的课程订单分析(三)#
select * from order_info where user_id in ( select user_id from order_info where date > '2025-10-15' and product_name in ('Python',...
2023-09-10
0
271
题解 | #异常的邮件概率#简单题
# 先查找出正常用户的id with t1 as ( select id from user where is_blacklist = 0 ) # 找到正常用户发送给正常用户的邮件记录 select date, ROUND(sum(type='no_completed')/c...
2023-09-08
0
339
简单题,考察连接以及分组
select a.title, AVG(b.salary) as 'avg(s.salary)' from titles as a left join salaries as b on a.emp_no = b.emp_no group by a.title order by 'avg(s.sala...
2023-09-04
0
319
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页