38.返回顾客名称和相关订单号以及每个订单的总价 Customers 表有字段,顾客名称:cust_name 、顾客id:cust_id cust_id cust_name cust10 andy cust1 ben cust2 tony cust22 tom cust221 an cust2217 hex Orders订单信息表,含有字段,订单号:order_num 、顾客id:cust_id order_num cust_id a1 cust10 a2 cust1 a3 cust2 a4 cust22 a5 cust221 a7 cust2217 OrderItems表有字段,商品订单号:order_num 、商品数量:quantity 、商品价格:item_price order_num quantity item_price a1 1000 10 a2 200 10 a3 10 15 a4 25 50 a5 15 25 a7 7 7 【问题】 除了返回顾客名称和订单号,返回 Customers 表中的顾客名称(cust_name)和Orders 表中的相关订单号(order_num),添加第三列 OrderTotal,其中包含每个订单的总价,并按顾客名称再按订单号对结果进行升序排序。 【示例结果】返回顾客名称 cust_name、订单号order_num、订单总额OrderTotal cust_name order_num OrderTotal an a5 375 andy a1 10000 ben a2 2000 hex a7 49 tom a4 1250 tony a3 150 【示例解析】 例如顾客名称cust_name为an的顾客的订单a5的订单总额为quantity*item_price = 15 * 25 = 375,最后以cust_name和order_num来进行升序排序。

区块链毕设网qklbishe.com为您提供问题的解答

38.返回顾客名称和相关订单号以及每个订单的总价

Customers 表有字段,顾客名称:cust_name、顾客id:cust_id
cust_id cust_name
cust10 andy
cust1 ben
cust2 tony
cust22 tom
cust221 an
cust2217 hex
Orders订单信息表,含有字段,订单号:order_num、顾客id:cust_id
order_num cust_id
a1 cust10
a2 cust1
a3 cust2
a4 cust22
a5 cust221
a7 cust2217

OrderItems表有字段,商品订单号:order_num、商品数量:quantity、商品价格:item_price

order_num quantity item_price
a1 1000 10
a2 200 10
a3 10 15
a4 25 50
a5 15 25
a7 7 7
【问题】
除了返回顾客名称和订单号,返回 Customers 表中的顾客名称(cust_name)和Orders 表中的相关订单号(order_num),添加第三列 OrderTotal,其中包含每个订单的总价,并按顾客名称再按订单号对结果进行升序排序。

【示例结果】返回顾客名称 cust_name、订单号order_num、订单总额OrderTotal

cust_name order_num OrderTotal
an a5 375
andy a1 10000
ben a2 2000
hex a7 49
tom a4 1250
tony a3 150
【示例解析】
例如顾客名称cust_name为an的顾客的订单a5的订单总额为quantity*item_price = 15 * 25 = 375,最后以cust_name和order_num来进行升序排序。
没看明白
13:14

以上就是关于问题38.返回顾客名称和相关订单号以及每个订单的总价
Customers 表有字段,顾客名称:cust_name 、顾客id:cust_id cust_id cust_name cust10
andy cust1
ben cust2
tony cust22
tom cust221
an cust2217
hex Orders订单信息表,含有字段,订单号:order_num 、顾客id:cust_id order_num cust_id a1 cust10
a2 cust1
a3 cust2
a4 cust22
a5 cust221
a7 cust2217
OrderItems表有字段,商品订单号:order_num 、商品数量:quantity 、商品价格:item_price order_num quantity item_price a1 1000
10 a2 200
10 a3 10
15 a4 25
50 a5 15 25 a7 7 7 【问题】 除了返回顾客名称和订单号,返回 Customers 表中的顾客名称(cust_name)和Orders 表中的相关订单号(order_num),添加第三列 OrderTotal,其中包含每个订单的总价,并按顾客名称再按订单号对结果进行升序排序。

【示例结果】返回顾客名称 cust_name、订单号order_num、订单总额OrderTotal cust_name order_num OrderTotal an a5 375 andy a1 10000 ben a2 2000 hex a7 49 tom a4 1250 tony a3 150
【示例解析】 例如顾客名称cust_name为an的顾客的订单a5的订单总额为quantity*item_price = 15 * 25 = 375,最后以cust_name和order_num来进行升序排序。的答案

欢迎关注区块链毕设网-
专业区块链毕业设计成品源码,定制。

区块链NFT链游项目方科学家脚本开发培训

承接区块链项目定制开发

微信:btc9767

QQ :1330797917

TELEGRAM: BTCOK9

承接区块链项目定制开发


qklbishe.com区块链毕设代做网专注|以太坊fabric-计算机|java|毕业设计|代做平台-javagopython毕设 » 38.返回顾客名称和相关订单号以及每个订单的总价 Customers 表有字段,顾客名称:cust_name 、顾客id:cust_id cust_id cust_name cust10 andy cust1 ben cust2 tony cust22 tom cust221 an cust2217 hex Orders订单信息表,含有字段,订单号:order_num 、顾客id:cust_id order_num cust_id a1 cust10 a2 cust1 a3 cust2 a4 cust22 a5 cust221 a7 cust2217 OrderItems表有字段,商品订单号:order_num 、商品数量:quantity 、商品价格:item_price order_num quantity item_price a1 1000 10 a2 200 10 a3 10 15 a4 25 50 a5 15 25 a7 7 7 【问题】 除了返回顾客名称和订单号,返回 Customers 表中的顾客名称(cust_name)和Orders 表中的相关订单号(order_num),添加第三列 OrderTotal,其中包含每个订单的总价,并按顾客名称再按订单号对结果进行升序排序。 【示例结果】返回顾客名称 cust_name、订单号order_num、订单总额OrderTotal cust_name order_num OrderTotal an a5 375 andy a1 10000 ben a2 2000 hex a7 49 tom a4 1250 tony a3 150 【示例解析】 例如顾客名称cust_name为an的顾客的订单a5的订单总额为quantity*item_price = 15 * 25 = 375,最后以cust_name和order_num来进行升序排序。