SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and subtyp1='Footwear' and upper(subtyp2)<>'EMPTY' and style_id IN (8790,8952,15431,15432,15433,15434,15729,15734,15735,15736,15741,15742,15910,15913,16782,16783,16784,16789,17180,17182,18140,18145,18147,18150,18276,19948,19949,19952,19953,20297)
GROUP BY subtyp2 |