I have query that joins Products table on Product_Attributes table. I' would like to get products which meat exact condition ex.
Products which have attribute id 9 AND 16 selected, but when I run this query I'll get only product which meets first ID
WHERE ("AttributeValueID" = 9 AND "AttributeValueID" = 16)
I need that products to have both attributes selected AttributeValueID = 9 AND AttributeValueID = 9 not only this or that attribute ID. Using OR / IN is'not solution for me.
Update:
below is a part of query with join / where:
LEFT JOIN "Product_Attributes" ON "Product_Attributes"."ProductID" = "SiteTree_Live"."ID" WHERE ("PriceTax" >= '100' AND "PriceTax" <= '200') AND ("AttributeValueID" IN ('9','8','7')) AND ("AttributeValueID" IN ('5','4'))
thank you in advance for your help
PriceTaxa column from Product_Attributes or from SiteTree_Live?)