SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='Accessories' and upper(subtyp2)<>'EMPTY' and style_id IN (756,2790,3406,3407,3408,4291,5225,5298,5304,13959,14962,15945,16949,17199,17680,17719,17720,18423,18466,20053,20054,20221,20342,20376,20378,20382,20498,21268)
GROUP BY subtyp2 |