CARLJOSEPHLEE
CARLJOSEPHLEE
全部文章
分类
题解(26)
归档
标签
去牛客网
登录
/
注册
CARLJOSEPHLEE的博客
全部文章
(共209篇)
题解 | 返回购买 prod_id 为 BR01 的产品的所有顾客的电子邮件(二)
select C.cust_email from (select order_num from OrderItems where prod_id='BR01') OI join Orders O on OI.order_num = O.order_num join Customers C on O....
2025-07-21
0
12
题解 | 确定哪些订单购买了 prod_id 为 BR01 的产品(二)
select O.cust_id,O.order_date from (select order_num from OrderItems where prod_id = 'BR01') OI join Orders O on OI.order_num = O.order_num order by...
2025-07-19
1
21
题解 | 返回顾客名称和相关订单号以及每个订单的总价
select C.cust_name,O.order_num,sum(OI.quantity*OI.item_price) OrderTotal from Customers C join Orders O on C.cust_id = O.cust_id join OrderItems OI on...
2025-07-19
1
15
题解 | 返回顾客名称和相关订单号
select C.cust_name,O.order_num from Customers C join Orders O on C.cust_id = O.cust_id order by C.cust_name
2025-07-19
1
12
题解 | 从 Products 表中检索所有的产品名称以及对应的销售总数
select P.prod_name,sum(OI.quantity) quant_sold from Products P join OrderItems OI on P.prod_id = OI.prod_id group by P.prod_name
2025-07-19
1
13
题解 | 返回每个顾客不同订单的总金额
select O.cust_id,sum(O_n.item_price*O_n.quantity) total_ordered from OrderItems O_n join Orders O on O_n.order_num = O.order_num group by O.cust_id or...
2025-07-19
1
18
题解 | 返回购买 prod_id 为 BR01 的产品的所有顾客的电子邮件(一)
SELECT DISTINCT C.cust_email FROM Customers C JOIN Orders O ON C.cust_id = O.cust_id JOIN OrderItems OI ON O.order_num = OI.order_num WHERE OI.prod_id...
2025-07-19
1
19
题解 | 分组排序练习题
select university,avg(question_cnt) avg_question_cnt from user_profile group by university order by avg_question_cnt
2025-07-18
2
29
题解 | 分组过滤练习题
select university,avg(question_cnt) avg_question_cnt,avg(answer_cnt) avg_answer_cnt from user_profile group by university having avg_question_cnt <...
2025-07-18
1
20
题解 | 分组计算练习题
select gender,university,count(*) user_num,round(avg(active_days_within_30),1) avg_active_day,round(avg(question_cnt),1) avg_question_cnt from user_pr...
2025-07-18
1
21
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页