SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and subtyp1='Outerwear' and upper(subtyp2)<>'EMPTY' and style_id IN (3622,3635,5331,5506,5637,5638,5700,5709,5726,5728,5732,5745,5762,9568,9721,9890,9904,9927,9931,14067,15470,16087,16669,16808,16881,16929,17939,18285,18413,20060,20286,20291,20301,20393,20577,20579,20771,20920,21057,21059,21066,21214,21221,21223,21225,21237,21238,21404,21432,21443,21486,21489,21512,21548,21549,21951,22108)
GROUP BY subtyp2 |