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,22,23,28,29,30,31,32,33,34,38,383,384,386,393,394,477,499,500,956,957,1433,1454,1455,1503,1505,1530,1533,1534,1536,1646,1656,1663,1664,1665,1668,1673,1675,1677,1679,1688,1690,1693,1702,1704,1706,1707,1709,1710,1711,1715,1720,1723,1724,1728,1733,1734,1737,1739,3007,4030,4063,4077,4078,4494,4495,4496,4500,4501,4503,4505,4507,4508,4511,4512,4515,4516,4716,4828,4830,4834,4835,5117,5118,5119,5120,5789,5790,8345,8405,8410,8414,8417,8444,8445,8446,8447,8452,8463,8466,8471,8473,8475,8476,8480,9185,9186,9187,9188,9189,9190,9191,9192,9193,9194,9195,9196,9197,9200,9201,9202,9205,9271,9273,9276,9318,9319,9321,9332,10998,10999,11001,11002,11004,11007,11008,11009,11098,11099,11100,11101,11106,11107,11110,11111,11112,11113,11118,11121,11122,11125,11126,11127,11128,11129,11130,11132,11133,11134,11135,11136,11137,11138,11139,11151,11330,11514,13897,14252,14268,14585,14754,14802,14803,14804,14805,15019,15025,15026,15133,15273,15274,15673,15775,15777,15885,15963,16292,16506,16694,16695,16696,17033,17098,17099,17100,17101,17102,17103,17104,17297,17383,17384,17385,17574,17575,1662,1705,1721,2831,3278,5791,8363,8457,8460,9183,9272,9285,9320,9323,9325,9326,9327,9330,9335,9336,9339,11092,11093,11103,11109,11115,11120,11145,11146,11150,11357)
GROUP BY subtyp1 |