Hello all.
I have really hard sql problem. 🙁
If anyone could help, it would be great.
I have the following tables:
table1:
ItemId----soldQty--Sk
1-------------5-------XXL
2-------------6---------L
3-------------4--------XXL
3-------------5--------XXL
1-------------1--------XXL
table2:
ItemId - itemName - stock
1----------T-shirt X--------3
2---------T-Shirt Gre------4
3---------T-Shirt Red------6
What i would like to do is display the information like this:
ItemId--itemName---------stock - soldQty - Sk
1---------T-Shirt X-------------3--------6--------XXL
3---------T-Shirt Redd--------6--------9---------XXL
I want it to be able to chane it from the Sk -- Like "XXL" or picking "L" So, you only get a list of either XXL or L
QtySold is the total of all orders with the same ID in Table1
If anyone can do this would be great!
Thanks so much.
Regards.