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,1585,2122,2124,2240,3246,4918,14034,14042,14043,14045,14049,14050,14051,14053,14054,14055,14058,14901,14930,14932,14933,15162,15163,15168,15171,15315,15386,15391,16230,16231,16234,16285,16286,16347,16738,17414,17417,17418,17422,17423,17424,17427,17428,17438,17446,17448,17450,17559,17659,17660,18624,18625,18627,18629,18631,18635,18638,18795,19433,19434,19435,19436,19695,19696,19697,19698,19699,19700,19701,19702,20822,21329,21332,21334,21335,21337,21338,21340,21341,21342,21343,21344,21345,21732,22082,22083,22458)
GROUP BY subtyp1 |