I have the following three tables:
I want to form query joining these 3 tables where my result is the product name, purchased, and sold.
Product Name - (from Products table)
Purchased - (Number of occurences in Purchase table according to ProductID)
Sold - (Number of occurences in Sale Table according to ProductID)
Can you please set me on the right track by giving me hints and I'll complete by myself?
I'm betting this will get deleted...but hopefully you see this before it does. The following is really helpful in understanding the differences in the SQL JOINS.
. This answer or Kyle's answers is all you need to solve your question.
Source: INNER JOIN, LEFT/RIGHT OUTER JOIN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With