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,6596,6659,6665,6841,6845,7078,7151,7172,7236,7287,7481,7628,7641,7744,10274,10282,10536,13950,14262,14582,14879,14880,14882,14883,15346,15352,15463,15465,15494,15495,15500,15521,15588,15597,15891,15975,15976,15977,15996,16003,16110,16269,16319,16374,16467,16735,16744,16745,16772,17159,17160,17367,17516,17836,17879,18432,18514,19849,19980,20142,20170,20670,20709,20763,20845,20849,20852,20885,20888,20903,21472,22051,22052,22054,22063)
GROUP BY subtyp2 |