SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='ACCESSORIES' and upper(subtyp1)<>'EMPTY' and style_id IN (1049,1066,1076,1085,1137,1234,1236,1275,1276,1285,2046,2049,2051,2140,2142,2159,2735,2817,2822,3263,3267,3275,3357,5794,5795,5796,5801,5805,5806,5825,5836,5859,5888,5889,5890,5894,5895,5909,5915,5916,5917,6374,6388,6394,6417,6427,6438,6441,6447,6525,6526,6587,6644,6653,6748,6770,6772,6852,6949,7024,7026,7051,7092,7094,7233,7266,7306,7347,7396,7465,7592,7593,7607,7610,7622,7667,7695,7734,7740,7750,7786,7817,7827,7830,7854,8701,8739,8741,9958,9997,10210,10214,10217,10226,10257,10263,10271,10289,10292,10344,10382,10386,10387,10391,10430,10467,10468,10484,10503,10504,10509,10511,10513,10514,10526,10589,10590,10593,10623,10627,10634,10666,10670,10691,10723,10724,10725,10738,10739,10956,10958,10960,10962,10965,10967,10968,10970,10973,11419,11452,11482,11512,11548,11558,11583,11609,11613,11618,13892,13893,13894,14160,14161,14536,14685,14687,14741,14767,14768,14770,14771,14823,14841,14906,14966,14993,14999,15001,15034,15052,15064,15108,15109,15115,15183,15184,15191,15202,15252,15294,15295,15307,15308,15318,15326,15343,15351,15362,15364,15371,15381,15382,15394,15437,15492,15583,15644,15653,15702,15753,15778,15900,15904,15917,15932,15954,15972,16075,16080,16115,16117,16118,16180,16181,16237,16291,16305,16306,16307,16310,16343,16396,16460,16490,16491,16770,16987,17052,17059,17060,17061,17062,17083,17148,17153,17238,17273,17294,17330,17331,17341,17342,17355,17388,17393,17395,17396,17479,17512,17536,17539,17551,17552,17553,17556,17636,17656,17661,17684,17733,17736,17737,17738,17755,17757,17771,17777,17804,17822,17845,17875,17876,17877,17977,17978,18019,18058,18167,18220,18326,18327,18501,18552,18681,18755,18839,19112,19175,19204,19229,19235,19241,19291,19293,2163)
GROUP BY subtyp1 |