SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='Accessories' and upper(subtyp2)<>'EMPTY' and style_id IN (683,684,685,733,756,764,780,784,918,947,950,953,2777,2782,2785,2786,2787,3379,3405,3406,3407,3408,5242,5249,5269,5298,5301,5302,5304,5313,5316,5339,5405,5425,5449,5451,5479,5662,5695,5696,5718,8802,8820,8867,8911,9063,9400,9427,9518,9575,9624,9626,9898,10760,10788,10805,10817,10841,10874,10877,11589,11592,13959,13961,14099,14101,14140,14255,14256,14678,14766,14836,15852,15893,16013,16015,16017,16020,16021,16122,16157,16169,16215,16216,16219,16221,16338,16353,16388,16768,16949,17174,17199,17709,17718,17719,17720,17865,17926,17927,18188,18227,18228,18234,18235,18236,18282,18283,18346,18377,18381,18423,18466,18535,18540,18667,18669,18672,18740,19279,19280,19309,19353,19354,19497,19589,20054,20078,20221,20222,20261,20262,20293,20295,20299,20317,20327,20328,20329,20330,20371,20374,20376,20382,20403,20497,20522,20570,20760,21031,21032,21173,21183,21262,21264,21265,21289,21291,21367,21378,21381,21495,21560,21561,21563,21569,21586,21589,21621,21622,21623,21624,21625,21627,21629,21630,21841,22110,22113,22114,22119,22124,22153,22156,22159,22160,22219,22301,22317,22318,22319,22320,10875,19629)
GROUP BY subtyp2 |