Where to Find General Ledger Account Balances in Sage 300 ERP?

Hi Sage City community,

I am currently working with Sage 300 ERP 2023 and trying to access general ledger account balances programmatically. I need to retrieve this data for a custom integration that I am doing.

Could anyone guide me on which specific database table I can find the general ledger account balances? I have explored several tables, but I'm having trouble locating this specific information.

Any advice or SQL query examples that can help me retrieve the balances from the database would be greatly appreciated.

Thank you in advance for your help!