Skip to content
Advertisement

How to subtract Expenses from Gross Profit from sql plus query?

I have to calculate Net profit So i have following query. How can i subtract “Total Expenses” from “Total Gross Profit”:

Advertisement

Answer

Provided every Item_id is sold and supplied only once

Othrewise you need to aggregate orders and supplied_items by item_id before joining.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement