SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='KNIVES, TOOLS AND GEAR' and upper(subtyp1)<>'EMPTY' and style_id IN (671,718,758,881,886,898,899,901,902,905,906,2367,2369,2371,2374,2375,2382,2387,2388,2391,2392,2393,2394,3122,3701,3718,3722,3724,3735,3736,3739,3742,3881,3943,4041,4056,4135,5921,5922,5923,5925,5929,5930,5931,5932,8393,13917,13918,13919,13972,14026,15250,15317,15338,15612,15677,15866,15868,15869,15870,15872,15873,15965,16191,16193,16197,16334,16692,16693,16737,17029,17139,17469,18288,18446,18448,18449,18474,19428,19710,19736,20519,20520,20563,20564,20592,20943,21072,21349,21350,21351,21352,21778,21798,21799)
GROUP BY subtyp1 |