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 (4542,4551,4558,4573,4577,4608,4613,4629,4643,4646,4647,4649,4655,4658,4666,4667,4668,4676,4681,4684,4686,4692,4699,4708,14232,14233,14345,14346,14982,14983,14985,14987,14988,15029,15058,15348,15796,16034,17096,17254,17462,17463,17464,17565,17593,17744,17745,17962,18082,18088,18172,18594,18596,18598,18599,18600,18603,18604,18605,18606,18937,19131,19132,19133,19134,19137,19300,19301,19302,19303,19404,19405,19505,19506,19930,4675)
GROUP BY subtyp2 |