I have a pseudo SQL statement like
select [orderid], [productname], [price], [productid_FK]
from Order
This will give me 5 rows:

So the result is 5 rows of which 3 have a [productid_FK] of “2”. This FK-column references to the table called [Product].
Now lets say I want an extra column based on the [productid_FK].
The column must contain the total number of products in another table called [products]
Can I achieve this by enchaning the current pseudo query?
One way to get the results is a subquery. There are several ways to do this depending on the DB. I often do it this way