SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='MENS BIKE CLOTHING' and upper(subtyp1)<>'EMPTY' and style_id IN (2136,2137,2138,2141,2145,2146,2149,2150,2156,2162,2810,2821,2823,4256,5831,5845,5851,5864,5865,5866,5868,5875,5876,5878,5882,5884,5900,5918,6502,6558,7256,7437,8623,8639,8664,10254,10281,10286,10332,10334,10338,10501,10608,10631,10687,10699,10718,10720,10729,10736,10741,11557,14278,14374,14634,14684,14782,14784,14806,14807,14842,15105,15662,15933,15958,16004,16395,16632,16633,16755,16756,16757,16804,17004,17074,17265,17271,18057,18255,18257,18754,5813,10740)
GROUP BY subtyp1 |