SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='PADDLESPORTS' and typ='ACCESSORIES' and upper(subtyp1)<>'EMPTY' and style_id IN (23,28,29,30,31,33,34,38,383,384,386,393,394,956,957,1454,1455,1479,1503,1504,1505,1530,1533,1534,1536,1646,1663,1664,1665,1668,1673,1675,1678,1679,1688,1693,1699,1702,1704,1706,1707,1709,1710,1711,1720,1723,1724,1737,3007,4030,4063,4077,4078,4494,4496,4500,4501,4503,4506,4507,4508,4509,4510,4511,4512,4716,4828,4830,4834,4835,5790,8401,8410,8414,8417,8452,8453,8463,8466,8480,9185,9186,9187,9189,9190,9191,9192,9193,9194,9195,9196,9197,9200,9201,9202,9276,9318,9319,9321,9329,9332,9333,9337,10998,10999,11002,11007,11008,11009,11098,11099,11100,11101,11106,11110,11111,11112,11113,11121,11122,11125,11130,11132,11133,11134,11135,11136,11137,11138,11139,11150,11151,11330,13897,14252,14268,14585,14754,14802,14803,14805,15019,15025,15274,15528,15775,15885,15963,16506,16694,16695,16696,16697,16897,17033,17034,17035,17102,17103,17104,17131,17200,17297,17383,17384,17385,17574,17575,17723,17747,19599,19615,19616,19627,19638,19805,19851,19975,1705,1721,2831,3278,5791,8363,8457,9183,9285,9320,9322,9323,9324,9325,9326,9327,9330,9335,9336,9339,11093,11103,11109,11115,11120,11146,11357)
GROUP BY subtyp1 |