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 (4557,4577,4620,4629,4630,4644,4646,4647,4649,4651,4661,4670,4676,4677,4681,4686,4699,4708,14232,14982,14983,14987,14988,15056,15058,15348,16035,17096,17463,17465,17961,17962,18594,18598,18600,18601,18603,18607,18937,19133,19134,19136,19137,19303,19404,19930,20705,20832,21452)
GROUP BY subtyp2 |