Tencent飞
Tencent飞
全部文章
分类
题解(40)
归档
标签
去牛客网
登录
/
注册
Tencent飞的博客
全部文章
(共28篇)
题解 | #纠错4#
SELECT cust_name, cust_contact, cust_email FROM Customers WHERE cust_state = 'MI' UNION SELECT cust_name, cust_contact, cust_email FROM Customers...
Mysql
2022-03-11
0
303
题解 | #组合 Products 表中的产品名称和 Customers 表中的顾客名称#
select p1.prod_name from Products p1 union all select c.cust_name as prod_name from Customers c order by prod_name
Mysql
2022-03-11
0
340
题解 | #将两个 SELECT 语句结合起来(二)#
select o1.prod_id, o1.quantity from OrderItems o1 where o1.quantity=100 union select o2.prod_id,o2.quantity from OrderItems o2 where o2.prod_id like ...
Mysql
2022-03-11
0
306
题解 | #将两个 SELECT 语句结合起来(一)#
select o1.prod_id, o1.quantity from OrderItems o1 where o1.quantity=100 union select o2.prod_id,o2.quantity from OrderItems o2 where o2.prod_id like ...
Mysql
2022-03-11
0
311
题解 | #列出供应商及其可供产品的数量#
SELECT v.vend_id, COUNT(p.vend_id) as prod_id FROM Vendors v left join Products p on v.vend_id = p.vend_id group by v.vend_id order by v.vend_id asc;
Mysql
2022-03-11
0
252
题解 | #返回产品名称和每一项产品的总订单数#
select p.prod_name , count(o.order_num) as orders from Products p left join OrderItems o on p.prod_id = o.prod_id group by prod_name order by p.prod_n...
Mysql
2022-03-11
0
265
题解 | #返回产品名称和与之相关的订单号#
SELECT p.prod_name, o.order_num from Products p left join OrderItems o on p.prod_id = o.prod_id order by p.prod_name asc
Mysql
2022-03-11
0
342
题解 | #检索每个顾客的名称和所有的订单号(一)#
select cust_name, order_num from Customers a inner join Orders b on a.cust_id = b.cust_id order by cust_name
Mysql
2022-03-11
0
319
题解 | #检索每个顾客的名称和所有的订单号(二)#
SELECT cust_name, order_num FROM Orders right join Customers on Orders.cust_id = Customers.cust_id order by cust_name
Mysql
2022-03-11
0
275
题解 | #检索每个顾客的名称和所有的订单号(一)#
select a.cust_name , b.order_num from Customers a, Orders b where a.cust_id = b.cust_id order by a.cust_name asc
Mysql
2022-03-11
0
268
首页
上一页
1
2
3
下一页
末页