SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='COMPONENTS' and upper(subtyp1)<>'EMPTY' and style_id IN (1093,1104,2816,2819,6392,6423,6448,6455,6478,6480,6482,6489,6490,6518,6527,6530,6562,6580,6591,6596,6633,6665,6705,6752,6755,6763,6782,6786,6812,6818,6827,6842,6845,6853,6885,6898,6904,6937,6987,7007,7058,7078,7110,7133,7151,7160,7168,7172,7236,7252,7287,7309,7310,7313,7314,7364,7372,7431,7438,7467,7473,7481,7582,7594,7599,7628,7640,7641,7642,7649,7690,7696,7699,7730,7743,7744,7773,7777,7784,7800,7811,7816,7847,7850,7861,7878,7884,7889,8342,8582,8600,8610,8620,8622,8640,8642,8663,8671,8683,8717,10274,10282,10283,10379,10380,10394,10495,10692,10694,10717,10940,11258,11415,11418,11429,11437,11448,11481,13928,14015,14105,14188,14375,14531,14534,14582,14680,14705,14773,14779,14780,14877,14879,14880,14881,14882,14883,14922,14945,14955,14974,14976,14997,15062,15134,15145,15154,15209,15246,15330,15332,15346,15352,15380,15444,15463,15465,15468,15494,15495,15500,15521,15587,15588,15597,15646,15757,15758,15772,15788,15854,15891,15937,15941,15942,15948,15949,15957,15960,15976,15977,15996,16104,16110,16116,16182,16255,16269,16270,16293,16294,16319,16369,16402,16467,16643,16736,16744,16745,16772,16965,17040,17042,17043,17055,17066,17084,17090,17092,17093,17159,17160,17241,17242,17259,17266,17301,17302,17345,17367,17374,17380,17467,17499,17502,17516,17545,17567,17568,17569,17571,17586,17635,17639,17681,17685,17692,17753,17796,17797,17823,17836,17879,17880,17964,17965,18066,18067,18068,18072,18094,18095,18116,18159,18266,18292,18332,18425,18432,18439,18440,18514,18515,18696,18701,18702,18703,18704,18761,18998,19293,19294,19358,19360,19479,19513,19610,19631,19649,19654,19658,19678,19706,19713,19714,19790,19848,19855,19925,19977,19980,20123,20141,20142,20170,20236,20237,20238,20242,20331,20333,6866,6960,7170,10547,17582)
GROUP BY subtyp1 |