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 (201,202,203,204,3849,3954,4092,4115,4166,4169,4175,4177,4539,4549,4561,4568,4581,4585,4609,4623,4632,4633,4656,4657,4659,4662,4663,4669,4672,4680,4688,4689,4690,4691,4697,4706,4710,9180,14987,14988,14989,15348,15796,16035,16039,17256,17257,19133,19302,11233)
GROUP BY subtyp2 |