SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='BACKPACKS AND BAGS' and subtyp1='Daypacks' and upper(subtyp2)<>'EMPTY' and style_id IN (1759,5046,5060,5088,5166,9511,9946,13986,14266,14267,14574,14575,14815,16646,17000,17843,19341,19343,19344,19691,20107,20915,20916,20953,20954,20955,21705)
GROUP BY subtyp2 |