ERROR at line 2: ORA-00979: not a GROUP BY expression
fniazi4uSep 26 2009 — edited Apr 16 2010select sum(debit)+sum(credit), ( select sum(END_BALANCE_1_YEAR_AGO) from ihcmain
where substr(account,11,5) = substr(a.account,11,5)) year_ago
from ihcgl a
where substr(account,11,5) between '10000' and '10033'
and to_date(accounting_date, 'dd-mon-yy') <= '31-dec-2008'
group by substr(a.account,11,5)
Can any body help me,, what is wrong with this query...............................