牛客987852806号
牛客987852806号
全部文章
分类
题解(45)
归档
标签
去牛客网
登录
/
注册
牛客987852806号的博客
全部文章
(共163篇)
题解 | #实习广场投递简历分析(三)#
with tiaojian as ( select job, month(date) as months, date_format(date,"%Y-%m") as month, sum(num) as cnt from resume_info where year(date)...
2024-01-11
0
203
题解 | #牛客每个人最近的登录日期(五)#
with tiaojian as ( select date from login group by date ),tiaojian1 as ( select t.m, round( count(distinct case when datediff(t.p,t.m)=1 then t.user...
2024-01-11
0
174
题解 | #近三个月未完成试卷数为0的用户完成情况#
select t.uid, sum(case when t.pday is not null then 1 else 0 end) as exam_complete_cnt from( select uid, date(start_time) as sday, date(submit_time) ...
2023-11-30
0
228
题解 | #连续两次作答试卷的最大时间窗#
select t.uid, max(datediff(t.m,t.pday))+1 as cnt, round( (t.puid/max((datediff(t.xday,t.mday))+1))*(max(datediff(t.m,t.pday))+1),2) as pcn from( selec...
2023-11-30
0
327
题解 | #查看不同年龄段的用户明细#
select device_id, gender, case when age<20 then "20岁以下" when age between 20 and 24 then "20-24岁" when age>=25 then...
2023-11-27
1
215
题解 | #计算用户8月每天的练题数量#
select day(date), count(id) from question_practice_detail where date_format(date,"%Y%m")=202108 group by date
2023-11-27
1
216
题解 | #计算用户的平均次日留存率#
select sum(case when datediff(t.py,t.date)=1 then 1 else 0 end)/ count(distinct device_id,date) from( select id,device_id,date, lead(date,1)over(part...
2023-11-27
1
190
题解 | #查找在职员工自入职以来的薪水涨幅情况#
with tiaojian as ( select emp_no from salaries where to_date="9999-01-01" ) select t.emp_no, sum(t.pt-t.salary) as growth from( select t.emp_no, s...
2023-06-27
1
322
题解 | #某宝店铺动销率与售罄率#
#此方法可以避免,链接做法的重复计算的问题 #先求销售表的每样产品的销售总额及销售总数量 with tiaojian as ( select item_id, date_format(sales_date,"%Y%m"), sum(sales_num) as pt, sum(sales_price)...
2023-06-01
0
361
题解 | #某宝店铺动销率与售罄率#
with tiaojian as ( select item_id, date_format(sales_date,"%Y%m"), sum(sales_num) as pt, sum(sales_price) as py from sales_tb where date_format(sales_...
2023-06-01
1
350
首页
上一页
6
7
8
9
10
11
12
13
14
15
下一页
末页