SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='MENS BIKE CLOTHING' and subtyp1='Bibs, Shorts & Tights' and upper(subtyp2)<>'EMPTY' and style_id IN (2138,2162,5851,5864,5868,5874,5875,5876,5882,10501,10718,10729,11557,15933,16004,16633,16804,18057,18257,19179,19232,19314,19376,19507,20362,21650,22180,22182,22184)
GROUP BY subtyp2 |