www大王叫我来巡山
www大王叫我来巡山
全部文章
分类
题解(31)
归档
标签
去牛客网
登录
/
注册
www大王叫我来巡山的博客
全部文章
(共18篇)
题解 | #返回产品名称和与之相关的订单号#
#outer join = left join and right join select prod_name,order_num from Products left join OrderItems on Products.prod_id = OrderItems.prod_id union se...
Mysql
2022-04-23
0
244
题解 | #检索每个顾客的名称和所有的订单号(二)#
区分有空值左右表 select cust_name,order_num from Customers left join Orders on Orders.cust_id = Customers.cust_id order by cust_name
Mysql
2022-04-23
0
154
题解 | #确定最佳顾客的另一种方式(二)#
select Customers.cust_name, sum(OrderItems.item_price*OrderItems.quantity) total_price from Orders inner join OrderItems on Orders.order_num = OrderIt...
Mysql
2022-04-23
0
124
题解 | #返回购买 prod_id 为 BR01 的产品的所有顾客的电子邮件(二)#
select cust_email from Orders inner join OrderItems on OrderItems.order_num = Orders.order_num inner join Customers on Orders.cust_id = Customers.cust...
Mysql
2022-04-23
0
159
题解 | #确定哪些订单购买了 prod_id 为 BR01 的产品(二)#
select cust_id,order_date from Orders where Orders.order_num in( select OrderItems.order_num from OrderItems where prod_id = 'BR01') order by order_da...
Mysql
2022-04-23
0
149
题解 | #返回购买价格为 10 美元或以上产品的顾客列表#
select dd.cust_id from (select Orders.cust_id,OrderItems.item_price from OrderItems left join Orders on OrderItems.order_num = Orders.order_num) dd wh...
Mysql
2022-04-09
0
160
题解 | #统计复旦用户8月练题情况#
#首先用左连接制作提取表,把所取字段提取建表,建表时需注意关注表中用户是否存在,附加日期筛选可避免遗漏用户 select user_profile.device_id,user_profile.university,question_practice_detail.question_id, ques...
Mysql
2022-03-28
0
142
题解 | #分组过滤练习题#
select university,avg(question_cnt) as avg_question_cnt,avg(answer_cnt) as avg_anser_cnt from user_profile GROUP by university HAVING avg_question_cnt...
数据库
2021-12-23
0
161
首页
上一页
1
2
下一页
末页