Andy Encumbrance test
Description
select count(*) count, gl.name ledger, gb.period_name, (select flvv.description from fnd_lookup_values_vl flvv where gb.actual_flag=flvv.lookup_code and flvv.lookup_type='BATCH_TYPE' and flvv.view_application_id=101 and flvv.security_group_id=0) balance_type, gb.actual_flag from gl_ledgers gl, gl_balances gb where gl.ledger_id=gb.ledger_id group by gl.name, gb.period_name, gb.actual_flag order by count(*) desc |