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 (707,877,881,886,897,899,901,905,906,910,912,2367,2369,2374,2375,2381,2382,2386,2387,2388,2391,2392,2393,2394,2763,2764,3122,3123,3701,3718,3720,3721,3722,3723,3724,3731,3732,3733,3735,3736,3739,3742,3743,3837,3891,3943,4023,4056,4057,4135,5921,5922,5923,5924,5925,5926,5929,5930,5931,5932,8393,8420,11336,13918,14026,14630,14631,14856,15250,15317,15338,15340,15400,15612,15652,15669,15872,15873,15916,15965,16154,16334,16691,16692,16693,16737,17029,17119,17469,17470)
GROUP BY subtyp1 |