GL Category and subledger entities

Description
Columns: Count, Je Source, User Source, Je Category, User Category, Event Type, Entity Code ...
select
count(*) count,
je_source,
user_source,
je_category,
user_category,
event_type,
entity_code
from
(
select
--gl.name ledger,
gjh.je_source,
(select gjsv.user_je_source_name from gl_je_sources_vl gjsv where gjh.je_source=gjsv.je_source_name) user_source,
gjh.je_category,
(select gjcv.user_je_category_name from gl_je_categories_vl gjcv where gjh.je_category=gjcv.je_category_name) user_category,
gjl.je_header_id,
gjl.je_line_num,
(select xett.name from xla_event_types_tl xett where xte.application_id=xett.application_id and xte.entity_code=xett.entity_code