SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and subtyp1='Bottoms' and upper(subtyp2)<>'EMPTY' and style_id IN (1383,1752,2954,3000,3086,3622,3627,3659,5377,5565,5912,6131,6132,6133,6134,8960,9023,9147,9150,9372,9858,11404,11473,11563,14126,14612,14642,14918,15079,15472,15508,15683,16143,16399,16400,16401,16500,16597,16807,16828,16872,16886,17284,17678,17840,17841,17857,17906,18442,18558,18844,18983,18985,18987,19031,19214,19331,19332,19334,19363,19366,19420,19427,19591,19830,19972,20087,20146,20150,20178,20194,20337,20353,20579,20633,20634,20713)
GROUP BY subtyp2 |