SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and subtyp1='Tops' and upper(subtyp2)<>'EMPTY' and style_id IN (338,1305,1747,1749,1750,1751,2170,2212,2957,2965,2975,3518,3609,5390,5391,5535,5563,5610,5612,5702,5745,5748,5751,5754,5755,5771,6222,6265,6316,6322,8024,8034,9885,11299,11311,11389,11556,14068,14069,14357,14514,14613,15121,15410,15417,15898,16397,16615,16653,16660,16795,16810,16817,16876,16881,16888,16980,17021,17024,17276,17279,17283,17285,17625,17627,17817,17858,17893,17895,17903,17904,17917,17940,17941,17944,17949,17950,18261,18341,18689,18690,18770)
GROUP BY subtyp2 |