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 (359,3641,5330,5438,5644,5645,5731,5777,9392,9598,9849,9915,15135,15698,16248,16607,16813,16827,17702,17934,17971,17972,18286,18955,18975,19860,19861,20076,20179,20188,20338,20417,20418,20567,20568,20596,20735,20766,21020,21067,21068,21069,21570,21583)
GROUP BY subtyp2 |