SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='HYDRATION' and subtyp1='Bottles' and upper(subtyp2)<>'EMPTY' and style_id IN (963,973,985,986,995,1000,1004,1005,1008,1009,1010,1011,1013,1017,1022,1023,1025,1031,1033,1034,1035,1042,1043,1487,1502,3025,3026,3028,3029,3030,3034,3042,3048,3052,3053,3753,3770,3775,3937,5161,14005,14006,14897,15012,15061,16760,17054,17405)
GROUP BY subtyp2 |