SELECT t1.filterOptionId, %s(t1.optionNumber) as optionNumber FROM `productFilterOptionNumber` as t1
LEFT JOIN productTag as t2 ON t1.productId = t2.productId
WHERE (t2.tagId = %d)
GROUP BY t1.filterOptionId