ironfelix717
Registered User.
- Local time
- Today, 08:21
- Joined
- Sep 20, 2019
- Messages
- 193
HI,
I need to write a query that finds the "closest" account balance to a specified date for each account in the system. I've tried this for hours. I'm done messing around and getting nowhere.
There are 2 tables: Accounts & Transactions.
I need to group the Transactions by each Account in 'ACCOUNTS' (or really doesn't even need to be linked to Accounts - see below).
Then find the 'BALANCE' closest to a specific date. - FOR EACH account
This query needs to return each unique account name. Note: Record in 'Transactions' will never have an account that doesn't exist in Accounts table. (see bold above)
Example question: List the balance for each account in transactions on 10/18/19
I need to write a query that finds the "closest" account balance to a specified date for each account in the system. I've tried this for hours. I'm done messing around and getting nowhere.
There are 2 tables: Accounts & Transactions.
I need to group the Transactions by each Account in 'ACCOUNTS' (or really doesn't even need to be linked to Accounts - see below).
Then find the 'BALANCE' closest to a specific date. - FOR EACH account
This query needs to return each unique account name. Note: Record in 'Transactions' will never have an account that doesn't exist in Accounts table. (see bold above)
Example question: List the balance for each account in transactions on 10/18/19