SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='COMPONENTS' and subtyp1='Tires' and upper(subtyp2)<>'EMPTY' and style_id IN (2819,6489,6490,6518,6596,6665,6842,6845,7078,7151,7160,7172,7236,7287,7313,7314,7364,7481,7628,7641,7696,7744,10274,10282,10283,10380,14582,14879,14880,14881,14882,14883,15062,15346,15352,15444,15463,15465,15494,15495,15500,15521,15587,15588,15597,15772,15891,15960,15976,15977,15996,16110,16182,16269,16319,16369,16467,16643,16736,16744,16745,16772,17159,17160,17367,17516,17571,17836,17879,17880,18066,18067,18068,18116,18432,18514,19294,19360,19658,19848,19855,19925,19980,20142,20170,20331)
GROUP BY subtyp2 |