SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='ACCESSORIES' and upper(subtyp1)<>'EMPTY' and style_id IN (1049,1085,1137,2051,2822,5794,5795,5796,5801,5802,5805,5806,5836,5888,5890,5909,5915,5916,5917,6388,6441,6447,6457,7051,7094,7306,7347,7592,8736,9958,10144,10257,10292,10382,10386,10484,10503,10504,10509,10723,10731,10956,11419,11439,11528,11604,11613,13894,14150,14496,14685,14687,14841,14993,15004,15052,15115,15234,15307,15492,15676,15702,16396,16987,17083,17294,17330,17331,17342,17636,17737,17875,17876,17877,17977,17978,18058,18167,18501,18838,18839,19175,19368,19514,19649,19661,19662,19938,19941,19942,20140,20168,20650,20651,20652,20660,20679,20680,20907,21460,21461,21601,21720,21962)
GROUP BY subtyp1 |