SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='MORE...' and typ='PUBLICATIONS' and subtyp1='Books' and upper(subtyp2)<>'EMPTY' and style_id IN (4577,4646,4647,4660,4667,4670,4676,4684,4686,4708,14983,14987,17291,17465,17961,18082,18595,18601,19131,19132,19134,19136,19137,19404,20703,20704,20705,20832)
GROUP BY subtyp2 |