Is there a better way to perform the following query? I'm trying to see if a user has all of the products in a certain category
SELECT t1.id
FROM
(SELECT count(product_id) as count, product_id FROM categories group by product_id) t1
INNER JOIN
(SELECT count(product_id) as count, product_id FROM categories INNER JOIN user_products on user_products.product_id = categories.product_id where user_id=116 group by product_id) t2
ON t1.id=t2.id
WHERE t1.count = t2.count