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,2954,3000,3086,3556,3560,3622,3627,3659,5377,5565,5649,5912,6131,6132,6133,6134,6275,8003,8960,9023,9147,9150,9858,11309,11404,11473,11563,14126,14492,14612,14642,14918,15472,15508,16143,16399,16400,16401,16442,16500,16597,16621,16657,16683,16807,16828,16872,16886,17284,17678,17840,17841,17906,17922,18442,18558,18844,18976,18983,18985,18987,19031,19164,19167,19213,19214,19216,19217,19296,19331,19332,19334,19363,19366,19414,19420,19421,19427,19557,19584,19588)
GROUP BY subtyp2 |