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,1452,1458,1460,1461,1462,1463,1468,1472,1473,1474,1475,1480,1482,1486,1490,1492,1493,1496,1508,1527,1528,1538,1539,1541,1542,1543,1544,1545,1546,1548,1549,1550,1551,1552,1553,2448,2450,2455,2770,3049,3114,3115,3118,3167,3171,3172,3758,3759,3760,3786,3827,3856,3903,4000,4016,4033,4069,4075,4081,4100,4119,4120,4483,5039,5042,5043,6601,8366,8371,8372,8373,8374,8395,8398,8403,8406,8407,8408,11333,13984,14182,14183,14972,15083,15085,15335,15336,15337,15546,15550,15801,16299,17316,17317,17318,17694,17830,17831,18259,18475,18476,19004,19019,19189,19605,19679,20095)
GROUP BY subtyp1 |