CARLJOSEPHLEE
CARLJOSEPHLEE
全部文章
分类
题解(26)
归档
标签
去牛客网
登录
/
注册
CARLJOSEPHLEE的博客
全部文章
(共216篇)
题解 | 组合 Products 表中的产品名称和 Customers 表中的顾客名称
select prod_name from Products union select cust_name from Customers order by prod_name
2025-07-21
0
25
题解 | 将两个 SELECT 语句结合起来(一)
select prod_id,quantity from OrderItems where quantity = 100 or prod_id like "BNBG%"
2025-07-21
0
27
题解 | 列出供应商及其可供产品的数量
select V.vend_id,count(P.prod_id) prod_id from Vendors V left join Products P using (vend_id) group by V.vend_id order by V.vend_id
2025-07-21
0
31
题解 | 返回产品名称和与之相关的订单号
select prod_name,order_num from Products A left join OrderItems B on A.prod_id=B.prod_id union select prod_name,order_num from Products C right join O...
2025-07-21
0
26
题解 | 检索每个顾客的名称和所有的订单号(二)
select C.cust_name,O.order_num from Customers C left join Orders O on C.cust_id = O.cust_id order by C.cust_name
2025-07-21
0
21
题解 | 检索每个顾客的名称和所有的订单号(一)
这题是中等? 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-21
0
26
题解 | 确定最佳顾客的另一种方式(二)
select C.cust_name,sum(OI.item_price*OI.quantity) total_price from Customers C join Orders O on C.cust_id = O.cust_id join OrderItems OI on OI.order_n...
2025-07-21
0
19
题解 | 返回购买 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
27
题解 | 确定哪些订单购买了 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
36
题解 | 返回顾客名称和相关订单号以及每个订单的总价
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
30
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页