How would I do a basic profit and loss statement in SQL?
I have a sales table with a costs field, and summing that field should show the total profit
Likewise I have a purchases table with a cost field, which should show the total money going out.
To show profit, would I just SUM the total costs in sales, and subtract the total costs in purchases?