Account Balances

SUGGESTED

Ok, I have read a bunch of websites, blogs, etc. and I cant find the answer to a simple question.  I have sage 50 us 2018.  I have dumped all the table data into a sql database.  I have an GL account for cash.  I want to create a query to get the GL balance of my cash account as of a certain day.  What does that query look like? in other words which tables would I access and link