G
Guest
Consider a simple Structure:
SalesTable: OrderID, DateOrdered, Etc.
InvoicesTable: SalesTable.OrderID, InvoicedAmount, DateCollected
PayablesTable: SalesTable.OrderID, PayedOutAmount, DatePaid
Relationships are simple one to many where OrderID from the SalesTable is
PrimaryTable, having Many relation in the Invoices and Payables table.
Question: Write a query that Sums InvoicedAmount, Sums PayedOutAmount Such
that a "profit" can be calculated. My efforts have generated "too complex"
errors or worse
Any guidance is appreciated!
SalesTable: OrderID, DateOrdered, Etc.
InvoicesTable: SalesTable.OrderID, InvoicedAmount, DateCollected
PayablesTable: SalesTable.OrderID, PayedOutAmount, DatePaid
Relationships are simple one to many where OrderID from the SalesTable is
PrimaryTable, having Many relation in the Invoices and Payables table.
Question: Write a query that Sums InvoicedAmount, Sums PayedOutAmount Such
that a "profit" can be calculated. My efforts have generated "too complex"
errors or worse

Any guidance is appreciated!