Free Fusion SQLGeneral LedgerRead-only

Trial balance — natural account totals

Aggregates posted activity per natural account for a given ledger and period. Confirms feed of subledger to GL.

Tables used

gl_balances gl_code_combinations gl_ledgers

Bind parameters

Supply values for :period_name when you run it.

How to run it

Paste it into a BI Publisher data model as a SQL data set, or into QueryWell's Query Studio and run it against your pod with a reporting account. Results come back to a grid you can profile, chart and export with a SHA-256 hash.

SQLdba-gl-account-balances
SELECT
  cc.segment3            AS natural_account,
  led.name                AS ledger_name,
  bal.period_name,
  SUM(NVL(bal.period_net_dr, 0)) AS period_dr,
  SUM(NVL(bal.period_net_cr, 0)) AS period_cr,
  SUM(NVL(bal.period_net_dr, 0)) - SUM(NVL(bal.period_net_cr, 0)) AS net_activity
FROM   gl_balances           bal
JOIN   gl_code_combinations  cc  ON cc.code_combination_id = bal.code_combination_id
JOIN   gl_ledgers            led ON led.ledger_id          = bal.ledger_id
WHERE  bal.period_name = :period_name
  AND  bal.actual_flag = 'A'
GROUP BY cc.segment3, led.name, bal.period_name
ORDER BY natural_account

A single read-only SELECT against Oracle Fusion Cloud's supported reporting surface. Column names and views can differ by release and by the roles your reporting account holds, so validate the result against a report you already trust before relying on it.

glbalancetrial-balance

Related

More General Ledger queries

Run it without the template cycle

QueryWell runs this and 81 other curated scripts against your own Fusion pod from one signed desktop app — grid, charts, profiling and hashed exports included. Perpetual licence, 14-day trial.