Home > database >  How to write a inventory list
How to write a inventory list

Time:11-12

Storage table
Product name brand product specification supplier inventory quantity


Outbound table

Brand name products specifications of products supplier delivery



To conclude the table


Product name brand product specification supplier inventory quantity

CodePudding user response:

 
Select a product name, product brands, product specifications, the supplier, inventory number=sum (quantity)
The from (select the product name, product brands, product specifications, the supplier, quantity=inventory quantity from storage table
Union all
Select a product name, product brands, product specifications, the supplier, quantity=outbound quantity * 1 from outbound table) t
Group by product name, product brands, product specifications, the supplier

CodePudding user response:

Thank you very much, I am a little white, the delivery * - 1 no see this place, trouble you tell me the again, thank you!

CodePudding user response:

The decrease in the number of outbound is equal to the inventory.

CodePudding user response:

Ok, thank you very much
  • Related