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 (1440,1443,1444,1452,1458,1460,1461,1462,1463,1468,1472,1473,1474,1475,1480,1482,1486,1490,1492,1493,1496,1508,1527,1528,1538,1539,1540,1541,1542,1543,1544,1545,1546,1548,1549,1550,1551,1552,1553,2448,2450,2453,2454,2455,2458,2770,3049,3114,3115,3116,3118,3167,3171,3172,3175,3748,3758,3759,3760,3786,3787,3789,3808,3827,3856,3897,3903,3949,3955,3967,3968,4000,4016,4033,4069,4071,4072,4075,4080,4081,4100,4119,4120,4482,4483,5039,5040,5042,5043,6601,8354,8369,8370,8371,8372,8373,8374,8376,8395,8398,8403,8406,8407,8408,11333,13970,13984,14182,14183,14483,14816,14970,14972,15084,15085,15335,15336,15546,15547,15550,15801,16339,17053,17316,17317,17318,17408,17694,17830,18259,18475,18476,19004,19019,19189,19307,19308,19605)
GROUP BY subtyp1 |