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,1557,1558,1559,1560,1825,1956,1998,2006,2362,2442,3309,3314,3347,3352,3676,3690,4217,4388,4960,4968,4991,4999,5005,5019,5026,8152,8183,8241,8242,8266,8320,9783,11288,11625,13949,14073,14229,14648,14828,14829,15090,15451,15502,15516,15697,15881,16583,16628,16729,16861,16866,16939,16961,16994,16997,17002,17519,17520,17650,18134,18186,18314,18417,18615,18823,18824,19008,19068,19076,19142,19143,19193,19384,19613,19751,19885,19997,20002,20005,20027,20028,20213,20365,20504,20505,20506,20507,20508,20602,20972,20993,21395,21396,21609,21714,21823,21827,21873,21875,21877,21880,21883)
GROUP BY subtyp2 |