SELECT a1.customerid as 货主代码,
a1.SOREFERENCE3 as 货主,
a1.orderno as SO编码,
a1.consigneename as 收货人,
a1.SOREFERENCE2 as 订单号,
a1.carriername as 承运商,
max(a1.deliveryno) as 快递单号,
to_char(b1.EDITTime, 'YYYY-MM-DD') as 分配时间,
C1.DELIVERYCONFIRMNO AS 交接单号
from DOC_ORDER_HEADER a1
left join ACT_ALLOCATION_DETAILS b1 ON B1.ORDERNO=A1.ORDERNO
left join DOC_DELIVERYCONFIRM_DETAILS c1 on c1.userdefine1= a1.orderno
group by c1.DELIVERYCONFIRMNO
order by C1.DELIVERYCONFIRMNO
为啥这样会报 not a group by expression