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,589,613,1436,1441,1445,1447,1465,1466,1481,1498,1499,1507,1524,4718,4719,4733,4736,4739,4740,4741,4743,4744,4752,4753,4760,4761,4762,4764,4765,4767,4768,4769,4770,4771,8351,8382,8436,8448,11237,11238,11282,11283,11286,11287,14003,14415,14541,14548,14550,14586,14790,14967,14968,15033,15311,15477,15478,15479,16102,16710,16722,17138,18487,18997,19020,19021,19096,19097,19098,19100,19101,19140,19327,19328,19335,19336,19337,19342,19348,20114,20130,20645,21635,21636,21637,21641,21777,21778,21779,21780)
GROUP BY subtyp1 |