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 (378,826,1556,1558,1559,1560,1956,1992,1998,2006,2441,3309,3314,3347,3352,3676,3690,4217,4960,4991,4999,5019,8320,8327,9783,10934,11290,11625,14073,14143,14425,14829,15055,15375,15451,15452,15454,15455,15516,15697,16508,16631,16724,16727,16861,16866,16933,16947,16958,16997,16998,17002,17519,17520,17609,17647,17650,17860,18134,18185,18186,18417,18427,18429,18511,18537,18615,19007,19009,19042,19122,19142,19143,19209,19231,19384,19475,19613,19885,19994,19997,20002,20003,20027,20028,20211,20213,20383,20504,20506,20508,20597,20602,21000,21002,21395,21606,21609,21714,21823,21824,21827,21873,21875,21876,21877,21878,21880,21883)
GROUP BY subtyp2 |