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,4608,4613,4629,4646,4647,4649,4660,4661,4664,4667,4670,4676,4681,4686,4692,4699,4708,14232,14345,14982,14983,14984,14987,14988,14989,15056,15058,15348,16034,16035,16260,17096,17462,17463,17465,17745,17961,17962,18594,18595,18598,18600,18601,18603,18605,18606,18607,18937,19131,19132,19133,19134,19136,19137,19303,19404,19505,19930,20705,20832,21452,4675)
GROUP BY subtyp2 |