玉树叶
玉树叶
全部文章
题解
未归档(1)
归档
标签
去牛客网
登录
/
注册
玉树叶的博客
全部文章
/ 题解
(共65篇)
题解 | #牛客直播各科目出勤率#
来自专栏
本来想着寒假一天一个sql和算法题,结果中间突发事故导致半个月没有写题,哎想想就难受。 通过代码 1.1SELECT t1.course_id, course_name, round(attend * 100 / sign,2) 'attend_rate(%)' from ...
Mysql
2022-01-26
0
565
题解 | #各城市最大同时等车人数#
来自专栏
通过代码 with t as (select event_time times, city, 1 num from tb_get_car_record where substr(event_time,1,7) = '2021-10' union all select ...
Mysql
2022-01-03
3
554
题解 | #工作日各时段叫车量、等待接单时间和调度时间#
来自专栏
通过代码 select case when time(event_time) between '07:00:00' and '08:59:59' then '早高峰' when time(event_time) between '09:00:00' and '16:59:59...
Mysql
2022-01-02
1
976
题解 | #每个城市中评分最高的司机信息#
来自专栏
通过代码 with t as (select driver_id , city, count(distinct date(order_time)) days, count(*) orders, sum(mileage) ways, sum(gr...
Mysql
2021-12-31
0
586
题解 | #有取消订单记录的司机平均评分#
来自专栏
SELECT COALESCE(driver_id,'总体') , round(sum(grade) / count(grade),1) from tb_get_car_order where driver_id in(select driver_id from t...
Mysql
2021-12-30
14
1617
题解 | #2021年国庆在北京接单3次及以上的司机统计信息#
来自专栏
通过代码 select '北京' city, round(sum(driver_order) / count(*),3) avg_order_num, round(sum(money) / count(*),3) avg_income from(select ...
Mysql
2021-12-29
11
1279
题解 | #店铺901国庆期间的7日动销率和滞销率#
来自专栏
select dt, round(count(distinct product_id)/(select count(product_id) from tb_product_info where shop_id = 901),3), round(1-count(distin...
Mysql
2021-12-28
2
630
题解 | #10月的新户客单价和获客成本#
来自专栏
通过代码 SELECT round(sum(total_amount) / count(*), 1) avg_aount, round((sum(shouldpay) - sum(total_amount)) / count(*), 1) avg_...
Mysql
2021-12-27
0
483
题解 | #零食类商品中复购率top3高的商品#
来自专栏
通过代码: SELECT product_id, round(sum(if(buytimes > 1,1,0)) / count(buytimes),3) repurchase_rate from(select uid, t_d.product_id produ...
Mysql
2021-12-26
0
493
题解 | #某店铺的各商品毛利率及店铺整体毛利率#
来自专栏
通过代码 with t as (SELECT t_d.product_id, sum(price * cnt) outprice, sum(cnt) sums, in_price FROM tb_order_detail t_d JOIN(SELECT ...
Mysql
2021-12-25
0
546
首页
上一页
1
2
3
4
5
6
7
下一页
末页