SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and subtyp1='Tops' and upper(subtyp2)<>'EMPTY' and style_id IN (337,1306,1427,2965,2979,3609,3650,4888,5390,5391,5745,5748,5754,5755,5762,5771,6240,6265,9568,11312,11313,14068,14069,14613,15685,15828,16836,16881,17939,18261,18988,19211,19248,19297,19974,20219,20431,20769,20770,20914,20958,21059,21090,21091,21112,21121,21125,21168,21211,21221,21224,21229,21236,21259,21314,21326,21355,21356,21406,21407,21408,21429,21431,21435,21438,21440,21484,21492,21494,21523,21527,21528,21529,21541,21546,21547,21948,21949,21950,22137,22138,22423)
GROUP BY subtyp2 |