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,4936,4937,4938,9110,9111,9250,9251,9253,14034,14042,14043,14045,14050,14051,14053,14054,14055,14057,14058,14926,14928,14930,14932,14933,15162,15163,15167,15168,15169,15172,15315,15386,15390,15391,16230,16231,16236,16285,16286,16738,16898,16900,17413,17414,17416,17417,17419,17420,17422,17423,17424,17426,17427,17428,17430,17431,17434,17435,17436,17437,17438,17439,17442,17444,17445,17446,17447,17448,17449,17452,17454,17455,17508,17509,17510,17559,17658,17659,17660,18623,18624,18626,18627,18628,18631,18635,18638,18795,18796,19429,19430,19433,19434,19435,19436,19692,19693,19694,19695,19696,19697,19698,19699,19700,19702,19703,1575,1576,9104)
GROUP BY subtyp1 |