Reputation: 4068
SELECT pid,cid,product_id,thickness FROM products WHERE thickness <> "";
SELECT cid,level,thickness FROM catalog WHERE thickness <> "";
All pid are mapped to the cid. I'm only interested in level 2 mapping.
Goal, I want to know which products DO NOT have the same value in thickness in both catalog, products. Note, products are attached to a category via cid and all products are attached to level 2 categories.
Upvotes: 1
Views: 59
Reputation: 263693
SELECT a.pid, a.product_ID
FROM products a
INNER JOIN catalog b
ON a.cid = b.cid AND
b.level = 2
WHERE a.thickness <> b.thickess
Upvotes: 1