SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='MORE...' and typ='PUBLICATIONS' and upper(subtyp1)<>'EMPTY' and style_id IN (202,206,472,473,474,3849,3866,3954,4092,4161,4169,4174,4175,4177,4539,4543,4549,4554,4557,4561,4577,4581,4593,4608,4609,4613,4623,4629,4642,4646,4647,4649,4655,4656,4657,4660,4661,4664,4667,4670,4676,4681,4686,4689,4690,4691,4692,4693,4699,4706,4708,4710,9489,13963,13967,14232,14345,14982,14983,14984,14987,14988,14989,15056,15058,15220,15348,15795,16034,16035,16038,16039,16040,16260,17096,17253,17254,17255,17256,17462,17463,17465,17745,17961,17962,18084,18087,18594,18595,18598,18600,18601,18603,18605,18606,18607,18937,19029,19030,19131,19132,19133,19134,19136,19137,19303,19404,19406,19505,19930,20705,20832,21092,21093,21452,475,4088,4675)
GROUP BY subtyp1 |