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,2819,6527,6562,6596,6755,6782,6803,6845,7110,7160,7170,7252,7287,7356,7363,7431,7594,7599,7628,7649,7744,7882,8342,8582,8591,8601,8618,8620,8622,8640,8663,10260,10261,10274,10282,10495,11488,13888,13928,14015,14105,14375,14582,14879,14880,14882,14883,14997,15352,15465,15587,15758,15975,15976,15977,15996,16643,16744,16745,17042,17302,17467,17502,17516,17639,17681,17685,17879,18486,18514,18703,18704,18762,19658,19678,19848,19849,20069,20123,20170,20729,20778,20845,20847,20849,20850,20852,20888,20889,20903,21472,6960)
GROUP BY subtyp1 |