SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='MORE...' and typ='SUNGLASSES AND READERS' and upper(subtyp1)<>'EMPTY' and style_id IN (1574,1578,1579,1580,1581,1585,2124,2237,2240,2241,3245,4918,4923,4924,4934,4936,4937,4938,4948,9110,9111,9125,9126,9250,9251,9253,9256,9257,14034,14040,14041,14042,14043,14044,14045,14046,14047,14048,14049,14050,14051,14053,14054,14057,14058,14059,14655,14656,14657,14658,14661,14662,14900,14926,14927,14928,14930,14932,14933,14941,15162,15165,15166,15167,15168,15169,15171,15172,15174,15175,15315,15386,15387,15390,15391,16285,16738,16739,17373,17413,17414,17415,17416,17417,17419,17420,17421,17422,17423,17424,17425,17426,17427,17428,17429,17430,17431,17432,17433,17434,17435,17436,17437,17438,17439,17440,17441,17442,17443,17444,17445,17446,17447,17448,17449,17450,17451,17452,17453,17454,17455,17506,17507,17508,17509,17510,17559,1575,1576,1577,9104)
GROUP BY subtyp1 |