SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='MORE...' and typ='PUBLICATIONS' and subtyp1='Guides' and upper(subtyp2)<>'EMPTY' and style_id IN (3849,3954,4092,4169,4174,4175,4177,4539,4549,4554,4561,4581,4593,4609,4623,4657,4689,4691,4693,4706,4710,14987,14988,14989,15348,16035,16039,17256,19133,19406,21092,21093)
GROUP BY subtyp2 |