SELECT pricerange as filter_item, count(DISTINCT style_id) as itemCount
FROM web_all_products
WHERE 1=1
--AND pictureid is not null
and ltrim(rtrim(dept)) = ? and ltrim(rtrim(typ)) = 'EMPTY'
AND (
1=2
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) = ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) = ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) = ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) = ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) = ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) = ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) = ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) like ?
OR upper(sizeList) = ?
)
GROUP BY pricerange ORDER BY pricerange