会编程的发呆爱好者加麻加辣
会编程的发呆爱好者加麻加辣
全部文章
分类
归档
标签
去牛客网
登录
/
注册
会编程的发呆爱好者加麻加辣的博客
全部文章
(共208篇)
题解 | 牛客直播开始时各直播间在线人数
select c.course_id,course_name, count(distinct user_id) as online_num from course_tb c join attend_tb a on c.course_id = a.course_id where substr(in_d...
2025-04-28
0
28
题解 | 牛客直播转换率
select c.course_id,course_name, round(sum(if_sign)/sum(if_vw)*100,2) as sign_rate from course_tb c join behavior_tb b on c.course_id = b.course_id gro...
2025-04-28
0
25
题解 | 某宝店铺连续2天及以上购物的用户及其对应的天数
select user_id,count(primary_date) as days_count from( select user_id,sales_date, row_number() over(partition by user_id order by sales_date) as rk, d...
2025-04-26
0
34
题解 | 某宝店铺动销率与售罄率
select p.style_id, round(100*sum(num)/(sum(inventory)-sum(num)),2) as pin_rate, round(sum(total)/sum(tag_price*inventory)*100,2) as sell_through_rate...
2025-04-26
0
32
题解 | 某宝店铺折扣率
#生成一行sales_price/sales_num as sales_jiage #avg(sales_jiage) group by item_id #两表连接 select round(sum(sales_price)/sum(tag_price*sales_num)*100,2) as d...
2025-04-26
0
25
题解 | 某宝店铺的实际销售额与客单价
select sum(sales_price) as sales_total, round(sum(sales_price)/count(distinct user_id),2) as per_trans from sales_tb sales_price竟是结算金额 而非单价
2025-04-26
0
27
题解 | 某宝店铺的SPU数量
select style_id, count(*) as SPU_num from product_tb group by style_id order by SPU_num desc 简单
2025-04-26
0
31
题解 | 各城市最大同时等车人数
#各城市单日中最大的同时等车人数,题目中给出的示例结果并未体现出各城市每日的最大的同时等车人数,因此可以忽略单日,只要求各城市最大的同时等车人数即可 #用户开始打车,等车+1 with t1 as (select city,sum(uv) over(partition by city order b...
2025-04-25
0
25
题解 | 工作日各时段叫车量、等待接单时间和调度时间
select ( case when substr(event_time,12,8)>='07:00:00' and substr(event_time,12,8)<'09:00:00' then '早高峰' when substr(event_time,12,8)&g...
2025-04-25
0
27
题解 | 国庆期间近7日日均取消订单量
#先查出要的日期 with t1 as( select distinct date(order_time) as dt from tb_get_car_order where date(order_time) between '2021-10-01' and '2021-10-03'), #查询要...
2025-04-25
0
28
首页
上一页
3
4
5
6
7
8
9
10
11
12
下一页
末页