select upp.item_total,
(select sum(iva.total_item_value_afs)
from (select sum(item_value_afs) total_item_value_afs
from (select distinct inn.reg_no,inn.tpt_cuo_nam, inn.item_total, inn.item_value_afs
from sigtasad.customs_import_data inn
where inn.reg_no = upp.reg_no and inn.tpt_cuo_nam = upp.tpt_cuo_nam
)
) iva
) total_item_value,
sum(upp.code_tax_amount),
upp.cmp_nam from SIGTASAD.CUSTOMS_IMPORT_DATA upp where upp.reg_no = '38699' and upp.company_tin = '9003247336' group by upp.reg_no, upp.tpt_cuo_nam, upp.cmp_nam, upp.item_total ;
此查询生成以下错误:
ORA-00904: "UPP"."TPT_CUO_NAM": 无效标识符 00904. 00000 - "%s: 无效标识符"