SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='HEALTH AND SAFETY' and upper(subtyp1)<>'EMPTY' and style_id IN (75,76,78,79,80,88,89,90,92,93,94,101,104,105,106,107,113,114,119,121,448,449,451,454,3119,3120,3765,3776,3785,3798,3802,3831,3834,3835,3869,3877,3898,3919,3922,3924,3999,4039,4055,4089,4096,4124,4132,4158,4185,4188,4201,4202,4203,4742,7759,8386,8387,8392,8399,8400,8421,8450,8451,9215,11337,11621,13945,13975,13976,13977,14172,14365,14366,14415,14416,14418,14419,14608,14742,15333,15650,15690,15709,15936,16145,16914,17088,17109,17110,17111,17112,17115,17116,17117,17118,17136,17137,17320,17404,17406,17407,17688,17832,17833,18260,18270,18654,19187,19240,19254,19465,19467,19558,19559,19619,20071,20384,20647,20648)
GROUP BY subtyp1 |