SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='CAMP KITCHEN' and upper(subtyp1)<>'EMPTY' and style_id IN (1443,1444,1460,1461,1463,1468,1472,1473,1474,1475,1480,1482,1486,1490,1496,1508,1527,1528,1538,1539,1540,1541,1542,1543,1544,1548,1549,1550,1551,1552,1553,2448,2450,2452,2453,2454,2455,2458,2770,3049,3050,3115,3116,3124,3167,3171,3172,3175,3758,3759,3786,3787,3789,3856,3903,3910,3949,3955,3956,4000,4016,4033,4069,4071,4072,4074,4080,4081,4100,4119,4120,4483,5042,5043,6601,8354,8369,8370,8371,8372,8373,8374,8376,8395,8398,8403,8406,8407,11333,13970,14483,14816,14972,15335,15336,15337,15546,15547,16339,17053,17316,17317,17318,17408,17694,17830,17831,18259,18299,18475,18476)
GROUP BY subtyp1 |