SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='Outerwear' and upper(subtyp2)<>'EMPTY' and style_id IN (329,359,3641,3665,5330,5438,5644,5645,5731,5777,8517,9392,9827,9849,9915,9949,15135,15422,15698,16248,16607,16827,16953,17702,17852,17862,17934,17971,17973,18435,18745,18947,18955,19860,19861,20062,20076,20077,20179,20188,20217,20246,20320,20338,20341,20345)
GROUP BY subtyp2 |