SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='HYDRATION' and upper(subtyp1)<>'EMPTY' and style_id IN (207,963,971,973,975,980,981,985,986,989,990,991,995,1000,1004,1005,1008,1009,1010,1011,1013,1014,1017,1018,1019,1022,1023,1025,1031,1032,1033,1034,1035,1038,1042,1043,1044,1045,1046,1446,1449,1450,1457,1459,1471,1487,1502,1513,1517,1519,1547,2496,3025,3026,3028,3029,3030,3034,3042,3048,3052,3053,3753,3770,3775,3851,3852,3937,3944,4108,4140,5052,5053,5054,5082,5094,5132,5133,5157,5158,5161,5199,5202,8205,11338,14005,14006,14166,14235,14238,14565,14897,15011,15012,15014,15015,15016,15017,15061,15081,15301,15593,15784,15785,15876,15928,16114,16164,16165,16166,16289,16297,16298,16585,16587,16588,16590,16591,16593,16760,16761,16972,17047,17048,17049,17050,17051,17054,17250,17347,17405,17476,17503,17504,17558,17587)
GROUP BY subtyp1 |