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 (1090,1093,1104,2816,2819,6423,6448,6455,6478,6480,6482,6489,6490,6527,6561,6562,6591,6596,6659,6665,6755,6763,6782,6786,6803,6811,6812,6818,6827,6845,6853,6885,6904,6937,6987,7007,7058,7078,7110,7133,7151,7160,7168,7170,7201,7236,7252,7287,7310,7356,7363,7372,7431,7438,7467,7473,7481,7550,7594,7599,7625,7628,7630,7640,7641,7642,7649,7690,7730,7743,7744,7751,7773,7777,7784,7800,7811,7816,7847,7850,7878,7882,7883,7884,7887,7889,8342,8582,8590,8591,8600,8601,8610,8618,8620,8622,8640,8643,8663,8683,8703,8717,10260,10261,10274,10282,10325,10328,10379,10380,10394,10495,10536,10692,10694,10717,10940,11258,11415,11418,11429,11437,11448,11481,11488,13888,13928,14015,14105,14188,14262,14375,14534,14582,14680,14705,14773,14779,14877,14879,14880,14882,14883,14922,14945,14955,14974,14976,14997,15062,15134,15145,15154,15209,15246,15330,15332,15346,15352,15463,15465,15468,15494,15495,15500,15521,15587,15588,15597,15646,15757,15758,15772,15788,15854,15891,15937,15941,15942,15948,15949,15957,15960,15975,15976,15977,15996,16003,16104,16110,16182,16255,16269,16293,16319,16369,16374,16402,16403,16467,16643,16736,16744,16745,16772,17039,17040,17042,17043,17055,17084,17092,17159,17160,17241,17242,17266,17301,17302,17345,17367,17374,17380,17467,17499,17502,17516,17567,17568,17569,17586,17635,17639,17681,17685,17753,17775,17796,17797,17823,17836,17879,17964,17965,17993,18065,18067,18072,18094,18159,18266,18292,18332,18432,18486,18514,18515,18696,18702,18703,18704,18761,18762,18835,18998,19285,19293,19358,19360,19479,19649,19654,19658,19678,19706,19713,19714,19790,19848,19849,19977,19980,20069,20123,20142,20170,20237,20238,20242,20333,20559,20580,20662,20670,20673,20674,20709,20712,20716,20727,20728,20729,20732,20744,20763,20778,20789,20845,20847,20849,20850,20851,20852,20888,20889,20903,21472,21538,21708,6960,10547,17582)
GROUP BY subtyp1 |