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 (350,3622,3635,5331,5594,5637,5638,5726,5728,5732,5745,5762,9568,9927,9931,14067,16087,16669,16806,16808,17625,17944,18413,18956,19032,19127,19129,19858,20059,20172,20286,20393,20577,20579,20771,21057,21059,21066,21113,21130,21134,21233,21237,21238,21239,21581,21595,9913)
GROUP BY subtyp2 |