CARLJOSEPHLEE
CARLJOSEPHLEE
全部文章
分类
题解(26)
归档
标签
去牛客网
登录
/
注册
CARLJOSEPHLEE的博客
全部文章
(共216篇)
题解 | 返回顾客名称和相关订单号
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
28
题解 | 从 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
30
题解 | 返回每个顾客不同订单的总金额
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
29
题解 | 返回购买 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
31
题解 | 分组排序练习题
select university,avg(question_cnt) avg_question_cnt from user_profile group by university order by avg_question_cnt
2025-07-18
2
37
题解 | 分组过滤练习题
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
34
题解 | 分组计算练习题
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
31
题解 | 计算男生人数以及平均GPA
select count(*) male_num,avg(gpa) avg_gpa from user_profile where gender = 'male'
2025-07-18
0
32
题解 | 查找GPA最高值
select round(max(gpa),1) gpa from user_profile where university = "复旦大学"
2025-07-18
1
31
题解 | 查看学校名称中含北京的用户
select device_id,age,university from user_profile where university like '%北京%'
2025-07-18
1
34
首页
上一页
3
4
5
6
7
8
9
10
11
12
下一页
末页