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 (51,54,60,378,795,798,799,803,804,810,826,1556,1557,1558,1559,1560,1825,1829,1830,1835,1836,1855,1869,1882,1887,1888,1889,1893,1923,1924,1931,1934,1945,1951,1952,1956,1992,1998,2006,2362,2441,2442,2443,2444,2445,2446,2829,3258,3259,3260,3309,3314,3324,3341,3347,3352,3676,3690,4217,4388,4957,4960,4968,4991,4998,4999,5005,5019,5021,5022,5026,5034,8152,8154,8183,8241,8242,8246,8266,8278,8320,8327,8329,8790,8816,8952,9130,9261,9263,9266,9268,9783,10433,10434,10435,10934,11290,11625,13949,14073,14133,14143,14229,14425,14601,14648,14722,14726,14728,14729,14730,14755,14828,14829,15055,15090,15198,15199,15213,15216,15375,15428,15431,15432,15433,15434,15446,15452,15453,15454,15455,15502,15516,15553,15555,15556,15637,15657,15658,15725,15726,15729,15734,15735,15736,15741,15742,15763,15881,15883,15913,16119,16507,16508,16581,16628,16631,16724,16727,16729,16748,16750,16782,16783,16784,16789,16861,16863,16866,16933,16936,16939,16947,16958,16959,16961,16994,16998,17002,17121,17180,17182,17483,17485,17487,17489,17519,17520,17521,17609,17611,17647,17650,17751,17752,17860,17975,18027,18029,18035,18133,18134,18140,18145,18150,18175,18185,18186,18189,18263,18276,18277,18298,18312,18314,18334,18417,18427,18429,18511,18537,18538,18615,18616,18617,18656,18822,18824,18846,18898,18926,18927,18929,19007,19008,19009,19011,19040,19042,19076,19081,19103,19122,19126,19138,19142,19143,19193,19231,19253,19254,19384,19475,19519,19613,19732,19751,19765,19810,19876,19878,19880,19885,19948,19949,19952,19953,19994,19997,20002,20003,20005,20027,20028,20132,20202,20203,20204,20211,20213,20297,20365,20383,20504,20505,20506,20507,20508,20597,20691,20912,20972,20993,21000,21002,21039,21041,21042,21395,21396,21606,21609,21714,21815,21823,21824,21827,21842,21843,21873,21876,21877,21878,21880,21883,22028,22258,22465)
GROUP BY subtyp2 |