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