GB279824
GB279824
全部文章
分类
归档
标签
去牛客网
登录
/
注册
GB279824的博客
全部文章
(共190篇)
题解 | 将两个 SELECT 语句结合起来(一)
select prod_id,quantity from OrderItems where quantity = 100 union select prod_id, quantity from OrderItems where prod_id LIKE 'BNBG%' order by pr...
2025-05-21
0
42
题解 | 列出供应商及其可供产品的数量
select vend_id, count(prod_id) as prod_id from Vendors V left join Products P using(vend_id) group by V.vend_id order by V.vend_id ASC;
2025-05-21
0
39
题解 | 返回产品名称和每一项产品的总订单数
select prod_name, count(order_num) as orders from Products P left join OrderItems O using(prod_id) group by prod_name order by prod_name A...
2025-05-21
0
38
题解 | 返回产品名称和与之相关的订单号
select prod_name,order_num from Products P left join OrderItems O using(prod_id) order by prod_name ASC;
2025-05-21
0
42
题解 | 检索每个顾客的名称和所有的订单号(二)
# select cust_name, order_num # from Customers C left join Orders O on C.cust_id = O.cust_id # order by # cust_name ASC; select cust_name, orde...
2025-05-21
0
46
题解 | 检索每个顾客的名称和所有的订单号(一)
select cust_name,order_num from Customers C inner join Orders O on C.cust_id = O.cust_id order by cust_name ASC;
2025-05-21
0
46
题解 | 确定最佳顾客的另一种方式(二)
select cust_name, sum(item_price * quantity) as total_price from OrderItems OI inner join Orders O on OI.order_num = O.order_num inner join Custom...
2025-05-21
0
44
题解 | 返回顾客名称和相关订单号以及每个订单的总价
# select cust_name,O.order_num, # (quantity * item_price) as OrderTotal # from Customers C left join Orders O on C.cust_id = O.cust_id # left...
2025-05-20
0
41
题解 | 返回顾客名称和相关订单号
# select C.cust_name,O.order_num # from Customers C INNER join Orders O ON C.cust_id = O.cust_id # order by C.cust_name ASC,O.order_num ASC; select c...
2025-05-20
0
39
题解 | 从 Products 表中检索所有的产品名称以及对应的销售总数
select prod_name, (select sum(quantity) from OrderItems OI where OI.prod_id = Products.prod_id) as quant_sold from Products
2025-05-20
0
47
首页
上一页
9
10
11
12
13
14
15
16
17
18
下一页
末页