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 (4539,4543,4551,4554,4557,4558,4561,4577,4591,4593,4608,4609,4629,4646,4647,4649,4655,4657,4660,4661,4663,4664,4667,4670,4672,4676,4684,4686,4689,4691,4692,4693,4706,4708,14982,14983,14985,14987,14988,14989,15056,15348,16260,17096,17253,17254,17255,17256,17291,17462,17463,17465,17745,17961,17962,18082,18084,18594,18595,18598,18599,18600,18601,18603,18605,18606,18607,18937,19131,19132,19133,19134,19136,19137,19303,19404,19406,19505,19930,20703,20704,20705,21452,4675)
GROUP BY subtyp1 |