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 (199,200,201,202,203,204,205,206,472,473,474,476,3752,3846,3867,3954,4092,4115,4167,4169,4174,4177,4196,4539,4542,4543,4549,4551,4554,4557,4558,4561,4568,4573,4577,4578,4580,4581,4585,4606,4608,4609,4623,4629,4632,4633,4642,4643,4646,4652,4655,4656,4658,4659,4660,4662,4663,4667,4668,4669,4673,4680,4681,4684,4688,4689,4690,4691,4692,4693,4697,4699,4706,4708,4710,9180,9489,13963,13969,14346,14984,15029,15056,15057,15058,15059,15220,15348,15796,16275,17291,17462,17463,17464,17465,17466,17565,17593,475,4672,4675)
GROUP BY subtyp1 |