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,1452,1458,1460,1461,1462,1463,1468,1472,1480,1482,1486,1490,1492,1493,1496,1508,1525,1527,1528,1538,1539,1540,1541,1542,1543,1544,1545,1546,1548,1549,1550,1551,1552,1553,2448,2449,2450,2451,2452,2453,2454,2455,2458,2459,2770,2771,3049,3050,3051,3167,3171,3172,3175,3748,3758,3759,3760,3786,3787,3789,3856,3903,3949,3955,3956,3963,3967,3968,4000,4016,4033,4036,4069,4070,4071,4072,4074,4075,4080,4081,4100,4120,4482,4483,5042,5043,8354,8369,8370,8371,8372,8373,8374,8376,8395,8398,8403,8406,8407,8408,11333,13970,14816,14887,14972,15085,15336,15546,15547,15589,15590,16339,17053,17316,17317,17318,17319,17408,11332)
GROUP BY subtyp1 |