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,2145,2146,2147,2162,5851,5864,5865,5868,5875,5876,5882,5918,10501,10718,10729,11557,14684,15933,16004,16633,16804,17271,18057,18255,18257,19155,19156,19157,19174,19179,19232,5813)
GROUP BY subtyp2 |