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 (581,583,613,1436,1441,1445,1447,1465,1466,1481,1498,1499,1507,1524,4718,4719,4733,4734,4736,4739,4740,4752,4753,4760,4761,4762,4764,4765,4768,4769,4770,4771,8351,8353,8448,11237,11238,11282,11283,11286,11287,14003,14415,14541,14548,14586,14790,14967,14968,15311,16102,16710,16714,16715,17138,18487,19096,19097,19098,19100,19101,19140,19327,19336,19337,19342,19772,19773,20114,20130,21635,21636,21638,21639,21640,21641,21777,21778,21779,4748)
GROUP BY subtyp1 |