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 (202,3849,3954,4092,4166,4169,4174,4175,4177,4539,4549,4554,4561,4568,4581,4591,4593,4609,4623,4656,4657,4663,4672,4689,4690,4691,4693,4706,4710,14987,14988,14989,15348,16035,16039,17254,17256,19133,19406,21092,21093)
GROUP BY subtyp2 |