斎虅飛鳥
斎虅飛鳥
全部文章
分类
题解(15)
归档
标签
去牛客网
登录
/
注册
斎虅飛鳥的博客
全部文章
(共9篇)
题解 | #确定最佳顾客的另一种方式(二)#
select cust_name,sum(item_pricequantity) as total_price from Orders o inner join Customers c on c.cust_id = o.cust_id inner join OrderItems r on o.or...
Mysql
2022-05-09
2
307
题解 | #返回购买 prod_id 为 BR01 的产品的所有顾客的电子邮件(二)#
select cust_email from Customers where cust_id in(select cust_id from Orders where order_num in( select order_num from OrderItems where prod_id = "BR0...
Mysql
2022-05-09
0
241
题解 | #返回购买 prod_id 为 BR01 的产品的所有顾客的电子邮件(一)#
select cust_email from Orders t2 left join OrderItems t1 on t1.order_num = t2.order_num left join Customers t3 on t2.cust_id = t3.cust_id where prod_i...
Mysql
2022-05-08
0
212
题解 | #返回购买价格为 10 美元或以上产品的顾客列表#
select cust_id from Orders t2 join OrderItems t1 on t1.order_num = t2.order_num group by cust_id having sum(item_price) >= 10 order by cust_id
Mysql
2022-05-08
5
288
题解 | #检索并列出已订购产品的清单#
select order_num,prod_id,quantity from OrderItems where quantity >= 100 and prod_id = 'BR01' union select order_num,prod_id,quantity from OrderItem...
Mysql
2022-05-07
0
210
题解 | #各个视频的平均完播率#
SELECT a.video_id, round(count(if(end_time - start_time >= duration, 1, null))/count(start_time ),3) as avg_comp_play_rate FROM tb_user_video_log a...
Mysql
2022-05-06
0
222
题解 | #计算25岁以上和以下的用户数量#
select user_profile.device_id, university, count(question_practice_detail.device_id) as question...
Mysql
2022-05-06
0
335
题解 | #计算25岁以上和以下的用户数量#
select user_profile.device_id, university, count(question_practice_detail.device_id) as question...
Mysql
2022-04-23
9
347
题解 | #统计每个学校的答过题的用户的平均答题数#
SELECT university, COUNT(question_id)/COUNT(DISTINCT user_profile.device_id) AS avg_answer_cnt FROM user_profile,question_practice_detail WHERE ques...
Mysql
2022-04-22
3
269