SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='By Activity' and upper(subtyp2)<>'EMPTY' and style_id IN (421,429,430,435,2136,2137,2138,2141,2145,2146,2147,2149,2156,2162,2810,2821,2823,4256,5851,5864,5865,5866,5868,5875,5876,5878,5882,5883,5884,5900,5918,6502,6558,7256,7437,8623,8639,8664,10254,10281,10286,10332,10334,10338,10501,10608,10631,10687,10699,10718,10720,10729,11557,14374,14634,14683,14684,14782,14806,14807,14842,15105,15958,16802,16804,17807,17808,18508,18509,19069,19071,19259,19260,19261,19263,19268,19269,19270,19271,434,5813,10740,11356)
GROUP BY subtyp2 |