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 (20,23,28,29,31,33,383,384,386,393,394,499,500,956,957,1432,1433,1454,1455,1479,1505,1536,1646,1663,1664,1665,1668,1673,1678,1699,1702,1706,1707,1709,1710,1723,1724,1734,4030,4063,4494,4496,4500,4503,4506,4507,4508,4509,4511,4512,4716,4828,4830,4831,4834,4835,8401,8410,8414,8417,8452,8453,8458,8463,8466,9186,9187,9190,9191,9192,9193,9194,9196,9197,9200,9201,9205,9276,9318,9319,9321,9329,9332,9333,9337,10998,10999,11002,11098,11099,11100,11101,11106,11111,11113,11121,11122,11125,11130,11133,11134,11135,11136,11137,11138,11139,11150,11151,11514,13897,14585,14754,14802,14803,14805,15025,15133,15274,15673,15775,15777,15885,16506,16694,16695,16696,16697,17033,17034,17035,17098,17102,17103,17104,17131,17200,17383,17574,17723,17747,19599,19615,19616,19627,19639,19975,21038,21039,21232,21246,21970,21971,22035,1705,1721,3278,5791,8457,9183,9322,9323,9324,9325,9326,9327,9330,9335,9336,9339,11109,11120,11146,11357,14871)
GROUP BY subtyp1 |