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,1306,1307,1427,1747,1749,1750,1751,2975,3609,5326,5390,5391,5535,5563,5564,5571,5610,5673,5702,5745,5748,5751,5754,5755,5771,6240,6265,6316,6322,8024,8069,9870,11278,11312,11313,11388,11389,14068,14069,14488,14646,15225,16397,16413,16425,16444,16598,16615,16616,16623,16794,16810,16836,16838,16870,16881,16891,16980,17020,17021,17279,17283,17625,17627,17674,17675,17895,17917,17939,17944,17950,18261,18443,18444,18445,18689,18690,18709,18710,18712,18717,18916,18917,18958,18962,18963,18964,18965,18982,18986,18988,19034,19035,19038,19039,19129,19130,19152,19161,19162,19163,19169,19211,19212,19219,19220,19221,19248,19249,19256,19297,19329,19330,19333,19356,19365,19407,19418,19422,19423,19424,19425,19555,19556,19586)
GROUP BY subtyp2 |