with A as (select t1.订单ID,t1.客户ID,t3.运货商 from 订单 t1) B as (select t2.订单ID,t2.产品ID,t2.销售额*(t2.单价*(1-t2.折扣)*t2.数量) from 订单明细 t2) C as (select 产品ID,类别ID,订购量 from 产品) select * from A left join B on A.订单ID = B.订单ID left join C on B.产品ID = C.产品ID |
最佳回答 |
||||
0
|
|