Your query will really work if you delete the connection - it is not actually used, and it will call the ord table inside the internal select subquery to conflict with the ord table that you joined:
SELECT ProductID, Name, Description, Price, (SELECT COUNT(*) FROM ord WHERE ord.ProductID = prod.ProductID) AS TotalNumberOfOrders FROM tblProducts prod
Alternatively, you can use a join table in combination with Group By :
SELECT ProductID, Name, Description, Price, COUNT(ord.ProductID) AS TotalNumberOfOrders FROM tblProducts prod LEFT JOIN tblOrders ord ON prod.ProductID = ord.ProductID GROUP BY ProductID, Name, Description, Price
Dexter
source share