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,6659,6665,6845,7078,7151,7160,7236,7287,7363,7481,7628,7641,7744,10274,10282,10380,10536,14262,14582,14879,14880,14881,14882,14883,15062,15346,15352,15463,15465,15494,15495,15500,15521,15587,15588,15597,15772,15891,15960,15975,15976,15977,15996,16003,16110,16182,16269,16319,16369,16374,16467,16643,16736,16744,16745,16772,17159,17160,17367,17516,17836,17879,18065,18067,18425,18432,18486,18514,19294,19360,19658,19848,19849,19980,20142,20170,20670,20709,20763,20845,20847,20849,20850,20851,20852,20888,20889,20903,21472,21538)
GROUP BY subtyp2 |