不精独乐乐
不精独乐乐
全部文章
分类
归档
标签
去牛客网
登录
/
注册
不精独乐乐的博客
全部文章
(共156篇)
题解 | #10月的新户客单价和获客成本#
select round(avg(total_amount),1), round(avg(b-total_amount),1) from (select order_id, total_amount from( select order_id, uid, event_time, total_amo...
2023-03-20
0
252
题解 | #零食类商品中复购率top3高的商品#
with tb2 as( select product_id, uid from (select *, max(date(event_time))over() dt from tb_order_overall where status=1) tb1 left join tb_order_detail...
2023-03-18
0
303
题解 | #某店铺的各商品毛利率及店铺整体毛利率#
with tb2 as ( select product_id, in_price, price, cnt from( (select * from tb_order_overall where status=1 and date(event_time)>='2021-10-01') as ...
2023-03-17
0
245
题解 | #使用字典计数#
a = list(input()) b = [a.count(i) for i in a] print(dict(zip(a,b)))
2023-03-16
0
194
题解 | #喜欢的颜色#
a = {'Allen': ['red', 'blue', 'yellow'],'Tom': ['green', 'white', 'blue'],'Andy': ['black', 'pink']} for i in sorted(a): print("%s's favorite colo...
2023-03-16
0
201
题解 | #增加元组的长度#
a = tuple(list(range(1,6))) print(a,len(a),sep='\n') b = tuple(list(range(6,11))) c = a+b print(c,len(c),sep='\n')
2023-03-15
0
269
题解 | #跳过列表的某个元素#
a=[i for i in range(1,16) if i%13 != 0] for i in a: print(i, end=' ')
2023-03-14
0
184
题解 | #连续签到领金币#
思路: ①如何判断连签:用签到日期-日期排序=连签日期(连签日期一致表明连续签到),对连签日期计数即得到连签天数。 ②连签天数以7天一个周期,每个周期里第3天、第7天得3分、7分,其余得1分,用%7进行取余判断。 with tb1 as( select uid, date(in_time) dt,...
2023-03-14
0
488
题解 | #每天的日活数及新用户占比#
with tb1 as( select distinct uid, date(in_time) dt, min(date(in_time))over(partition by uid) a from tb_user_log union select distinct uid,...
2023-03-13
0
180
题解 | #被5整除的数字#
a = list(range(1,51)) for i in a: if i%5 ==0: print(i) else: continue
2023-03-12
0
185
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页