SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='BACKPACKS AND BAGS' and subtyp1='Stuff Sacks' and upper(subtyp2)<>'EMPTY' and style_id IN (1516,5106,5107,5115,5122,8379,8380,8381,8391,8427,8428,8429,8431,8432,8433,14967,15618,15619,15620,15621,15622,18905,18906,18907,18908,18909,18910,18911,18912)
GROUP BY subtyp2 |