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 (826,1556,1558,1559,1992,1998,2006,2441,2444,3309,3352,3676,3690,4217,4960,4968,4991,4999,5026,8152,8154,8246,8329,11290,11625,13949,14073,14648,14828,15055,15452,15502,15516,15697,15881,16508,16724,16727,16861,16866,16958,16961,16997,17002,17520,17609,17650,18186,18314,18417,18427,18429,18538,18615,18822,19007,19009,19122,19209,19384,19613,19751,19810,19885,19994,19997,20002,20003,20027,20028,20211,20213,20504,20506,20507,20508,20597,20602,20912,20972,20993,21000,21002,21395,21396,21609,21714,21823,21824,21827,21873,21875,21876,21878,21880,21883)
GROUP BY subtyp2 |