[eluser]sore eyes[/eluser]
Hi Obiron, many thanks for your help. I do appreciate it. I have tried making the changes that you suggest, but to no avail. I introduced the unique id and taken out the group and count, but it does not list all the product.product_id. By the way, the counting is working successfully, but only limited to '1'.
I suspect the answer lies in the WHERE clause. This clause may be limiting the resultant set to only those values that have a product_id in the productsbyshop table. If this is the case, I don't know how to work around it. What do you think?