How can i join 3 tables and calculate the data in 3 tables.

Copper Contributor

Hi, 

I have 3 tables sales, production and consumption with which i have 20 orders for item b and the other 2 tables have the raw materials to make the item b. The production and consumption table gives the qty for preparing one item b. So i have to calculate qty for 20 such item b. So in the output i need item name and the quantity for each item. so can anyone solve this issue.Untitled.png

1 Reply

Hi @Varghese123 ,

 

Could you please attach your SQL statement which made your own first? It’s more efficient to give you a hand against your script. If you have no idea, try to fulfill the temple below:

Select <table1>.<field1>,...
From <table1> inner/right/left join <table2> on <table1.foreign key1> = <table2.foreign key1> ....
inner/right/left join....
Where....

 

Regards, 

Sten