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 (54,175,378,388,390,798,799,803,810,814,815,823,824,826,1556,1557,1558,1559,1560,1813,1816,1817,1825,1829,1830,1838,1842,1849,1851,1869,1888,1889,1893,1894,1895,1923,1924,1942,1951,1952,1956,1987,1992,1994,1995,1998,2003,2006,2195,2362,2441,2442,2443,2444,2445,2446,2850,2866,3258,3260,3309,3310,3314,3318,3324,3326,3338,3347,3352,3411,3676,3690,4048,4217,4316,4330,4388,4783,4963,4964,4991,4998,4999,5005,5019,5021,5022,5026,5034,5281,5306,5908,8152,8154,8183,8196,8202,8203,8208,8210,8241,8242,8246,8262,8266,8271,8272,8274,8275,8276,8278,8279,8280,8283,8320,8327,8329,8807,8808,8952,9039,9059,9071,9130,9259,9261,9263,9265,9266,9268,9499,9500,9782,9783,9905,9907,9909,10236,10243,10250,10433,10434,10435,10933,10934,11227,11288,11289,11290,11348,11477,11529,11536,11537,11625,13923,13949,14074,14133,14143,14200,14204,14206,14425,14426,14427,14571,14648,14722,14725,14726,14728,14729,14730,14755,14793,14794,14795,14819,14828,14829,15055,15090,15194,15198,15199,15247,15249,15375,15408,15426,15430,15431,15432,15434,15435,15446,15451,15452,15453,15454,15455,15502,15516,15517,15556,15657,15695,15697,15704,15729,15730,15734,15735,15736,15738,15742,15762,15763,15764,15881,15910,15913,16119,16384,16508,16579,16599,16627,16690,16724,16727,16729,16748,16750,16751,16782,16783,16784,16785,16788,16789,16863,17483,17485,17487,17489,17519,8790)
GROUP BY subtyp2 |