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,1385,1752,2180,2191,2215,2981,3086,3561,3627,3628,5377,5407,5565,5649,5912,6131,6132,6133,6134,6168,6174,8003,8070,8960,9023,9150,9658,9857,9858,11309,11310,11371,11404,11405,11473,11563,14126,14274,14276,14309,14335,14339,14492,14612,14618,14642,14918,15473,15505,16399,16400,16442,16500,16597,16613,16620,16621,16657,16662,16683,16807,16829,16834,16839)
GROUP BY subtyp2 |