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,5328,5330,5438,5644,5645,5731,5777,9849,9915,14127,15572,15573,16248,16607,16883,17852,17854,17972,18286,18947,18955,20062,20217,20417,20454,20483,20567,20568,20766,21069,21193,21210,21212,21216,21217,21219,21220,21252,21421,21502,21503,21988,21989,22175,22752)
GROUP BY subtyp2 |