本帖最后由 loveqw20087 于 2016-5-30 11:32 编辑 select wave,style,serial,type_name,code,sum(COUNT) as count,sum(JIN) as JIN from (SELECT a.*,d.wave,e.style,f.serial,b.type_name,a.count*b.price as jin FROM BIBEI."ORDER_T" a join BIBEI."GOODS_T" b on a.code=b.code join BIBEI."CUSTOMER_T" c on c. account=a.account join BIBEI."WAVE_T" d on d.id = b.wave_id join BIBEI."STYLE_T" e ON E.ID = B.STYLE_ID JOIN BIBEI."SERIAL_T" F ON F.ID = b.serial_ID where a.freeze =0 ${if(len(account)==0,"","and a.account in ('"+account+"')")} ${if(len(region)==0,"","and c.region in ('"+region+"')")}) group by wave,style,serial,type_name,code order by wave 看下哪里写错了还是什么原因。单客户选是能用的 |
最佳回答 |
||||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|