select a.订购日期,b.数量,b.单价, (select count(订单id) from 订单 where 是否已付='true') as 已付订单数量 from 订单 a left join 订单明细 b on a.订单ID=b.订单ID where year(订购日期)=${p_date} order by a.订购日期 我感觉没问题,大神们可以复制这个sql去验证一下。不知道 哪里错了 |
最佳回答 |
||||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|