SELECT t1.filterOptionValueId FROM productFilterOptionValue as t1
LEFT JOIN productCategory as t2 ON t2.productId = t1.productId
WHERE t2.categoryId = %d GROUP BY t1.filterOptionValueId