SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='SLEEP GEAR' and upper(subtyp1)<>'EMPTY' and style_id IN (544,563,564,567,580,581,583,589,613,1436,1441,1445,1447,1465,1466,1481,1498,1499,1507,1524,1537,4064,4718,4733,4734,4736,4739,4740,4741,4743,4744,4752,4753,4760,4761,4762,4764,4765,4766,4767,4768,4769,4770,4771,8351,8353,8364,8368,8382,8409,8436,8448,11237,11238,11282,11283,11284,11285,11286,11287,11351,11352,11354,14003,14376,14415,14548,14550,14586,14790,14860,14967,14968,15033,15040,15311,15477,15479,16710,16713,16714,16722,17071,17072,17134,17135,17138,17994,18017,18018,18487,18997,19020,19021,19022,19096,19097,19098,19099,19100,19101,19140)
GROUP BY subtyp1 |