SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CAMP AND HIKE' and typ='HEALTH AND SAFETY' and subtyp1='Camp Bathroom' and upper(subtyp2)<>'EMPTY' and style_id IN (445,2040,3869,3886,3921,3922,4039,4111,4132,4204,4742,8346,8392,8399,8450,8451,13975,13977,15650,16914,17136,17137,17402,17403,17404,17406,17407,17562)
GROUP BY subtyp2 |