Hello,
If I understood you correctly, you need all combinations of users and products that doesn't exist in Userproducts table?
If that is correct, then this query should give you all required results:
Select u.username, u.lastname, p.name
From User as u, Product as p
Where not exists
(Select * From Userproducts as up Where up.userid=u.id and up.productid=p.id)
If what you require is separately for users and for products, then it is even easier:
Users:
Select u.username, u.lastname
From User as u
Where u.id not in
(Select up.userid From Userproducts)
Products:
Select p.name
From Product as p
Where p.id not in
(Select up.productid From Userproducts)
Hope it helped.
Regards,