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 (200,201,202,203,204,206,472,473,474,3792,3849,3866,3867,3954,4092,4115,4161,4166,4167,4169,4175,4177,4539,4542,4543,4549,4551,4557,4558,4561,4568,4573,4577,4581,4585,4606,4608,4609,4613,4623,4629,4632,4633,4642,4643,4646,4647,4649,4655,4656,4657,4658,4659,4662,4663,4666,4667,4668,4669,4672,4673,4676,4680,4681,4684,4686,4688,4689,4690,4691,4692,4697,4699,4706,4708,4710,9180,9489,13962,13963,13967,13969,14232,14233,14345,14346,14982,14983,14987,14988,14989,15029,15056,15058,15220,15348,15795,15796,16034,16035,16038,16039,16040,17096,17255,17256,17257,17291,17462,17463,17464,17465,17565,17593,17744,17745,17962,18082,18084,18085,18086,18087,18088,18172,18594,18596,18597,18598,18599,18600,18601,18602,18603,18604,18605,18606,18607,18937,19026,19028,19029,19030,19131,19132,19133,19134,19136,19137,19300,19301,19302,19303,475,4088,4675,11233)
GROUP BY subtyp1 |