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='Trekking Poles' and upper(subtyp2)<>'EMPTY' and style_id IN (3718,3722,3724,3735,3736,3739,3742,4041,15317,15612,15677,16692,16693,17029,18288,18446,18448,18449,19428,19710,19736,20563,20564,20943,21072,21074)
GROUP BY subtyp2 |