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,1000,1004,1009,1010,1011,1013,1017,1022,1025,1031,1034,1035,1042,1043,1487,3025,3026,3028,3029,3034,3042,3052,3053,3763,3775,3855,3937,5161,14006,15012,16586,16760,17054,17669,18340,20106)
GROUP BY subtyp2 |