SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='KNIVES, TOOLS AND GEAR' and subtyp1='Knives & Multi-tools' and upper(subtyp2)<>'EMPTY' and style_id IN (881,886,898,899,901,905,906,907,2369,2371,2375,2382,2388,2392,2393,3122,4023,4056,13917,13918,13919,15340,15866,15868,15869,15870,15872,15873,16191,17139,17469,18474,19490,20519,20520,21349,21351,21352,21798,22224)
GROUP BY subtyp2 |