我有一个查询,我试图通过减去一列的总数来获得一列 - 其他但我收到错误。这就是我正在做的
select LOSA_APP.app_ref_no AS "App.Ref.No.",
CODE_BRANCH.branch_name AS "Business Unit",
....
sum(LOSA_FACILITIES.amt_appr) - DOCS_DISB_SIGN_OFF_LOG.sign_off_amt AS "Amount Not Disbursed",
...
from
losa_app LOSA_APP
INNER JOIN
code_branch CODE_BRANCH
ON
LOSA_APP.attend_branch = CODE_BRANCH.branch_id
...
where
LOSA_APP.app_status='A'; -- Application Status in {‘accepted’}
但我收到错误
ORA-00937: not a single-group group function
00937. 00000 - "not a single-group group function"
*Cause:
*Action:
Error at Line: 1 Column: 8
我怎样才能完成这件事?