SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and upper(subtyp1)<>'EMPTY' and style_id IN (378,419,439,826,1383,1556,1558,1559,1560,1956,1992,1998,2006,2441,3309,3314,3347,3352,3556,3627,3676,3690,4217,4960,4991,4999,5019,5383,6131,6133,7437,8005,8203,8320,8327,8679,9783,10254,10338,10405,10934,11290,11309,11625,14073,14143,14425,14492,14612,14785,14829,15055,15375,15451,15452,15454,15455,15516,15697,16399,16400,16507,16508,16631,16724,16727,16805,16829,16861,16866,16933,16947,16997,16998,17002,17519,17520,17609,17611,17647,17650,17860,18134,18185,18186,18417,18427,18429,18511,18537,18615,19007,19009,19042,19122,19142,19143,19209,19231,19334,19384,19475,19613,19885,19994,19997,20002,20003,20027,20028,20211,20213,20383,20504,20506,20508,20597,20602,20713,21000,21002,21135,21231,21232,21242,21318,21390,21395,21606,21609,21714,21823,21824,21827,21873,21875,21876,21877,21878,21880,21883)
GROUP BY subtyp1 |