select name,code,color_id,sum(COUNT) as count,sum(JIN) as JIN from (SELECT a.*,c.name,B.PRICE,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 where a.freeze =0 ${if(len(account)==0,"","and a.account ='"+account+"'")} ${if(len(region)==0,"","and c.region ='"+region+"'")}) group by name,code,color_id |
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|