牛客653386379号
牛客653386379号
全部文章
分类
题解(4)
归档
标签
去牛客网
登录
/
注册
牛客653386379号的博客
全部文章
(共4篇)
题解 | #确定最佳顾客的另一种方式(二)#
select cust_name,sum(item_price * quantity) total_price from OrderItems inner join Orders on OrderItems.order_num = Orders.order_num inner join Custom...
Mysql
2022-03-08
0
579
题解 | #返回顾客名称和相关订单号以及每个订单的总价#
select cust_name,Orders.order_num,sum(quantity*item_price) OrderTotal from Customers,Orders,OrderItems where Customers.cust_id = Orders.cust_id and Or...
Mysql
2022-03-08
9
699
题解 | #返回每个顾客不同订单的总金额#
select cust_id,sum(item_price*quantity) total_ordered from OrderItems,Orders where OrderItems.order_num = Orders.order_num GROUP BY cust_id order by t...
Mysql
2022-03-08
46
3136
题解 | #分组计算练习题#
SELECT gender,university,COUNT(*) AS user_num,AVG(active_days_within_30) AS avg_active_day,AVG(question_cnt) AS avg_question_cnt FROM user_profile GRO...
Mysql
2022-03-07
0
206