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 (1572,1574,1578,1580,1581,1585,2122,2124,2240,3245,4918,4923,4934,4936,4937,4938,4948,9110,9111,9250,9251,9253,9256,14034,14041,14042,14043,14044,14045,14048,14049,14050,14051,14053,14054,14055,14057,14058,14059,14900,14926,14927,14930,14932,14933,15162,15165,15167,15168,15169,15171,15172,15174,15315,15386,15390,15391,16230,16231,16234,16236,16285,16286,16347,16738,16898,16900,17413,17414,17415,17416,17417,17419,17420,17422,17423,17424,17426,17427,17428,17429,17430,17431,17434,17435,17436,17437,17438,17439,17441,17442,17444,17445,17446,17447,17448,17449,17450,17451,17452,17454,17455,17507,17508,17509,17510,17559,17658,17660,18623,18624,18625,18626,18627,18628,18630,18631,18633,18635,18638,18795,18796,18934,1575,1576,9104)
GROUP BY subtyp1 |