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,203,3954,4092,4177,4539,4549,4561,4568,4585,4591,4609,4623,4632,4656,4657,4659,4663,4669,4680,4688,4689,4691,4693,4697,4706,9180,14987,14988,15348,15796,16039,17254,17256,19133,19302,19406)
GROUP BY subtyp2 |