I have 2 tables, purchases and sales with each having a date field and a cost field.
I want to generate reports of a few different types, for example I want to show profit and loss over each month or year, or to show how often a particular item sold for a given arbitrary time period ( probably based on user input)
Is it terribly complex to do queries such as this, do they rely on complex calculations?
For example, how would I total the sales.costs field and the total of purchases.costs to show profit and loss?