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 (3,685,688,696,734,756,918,930,941,946,947,950,953,2217,2781,2787,3098,3379,3406,3408,3797,4290,4291,5225,5235,5236,5249,5269,5270,5273,5279,5298,5300,5301,5302,5304,5309,5312,5313,5316,5324,5339,5405,5449,5451,5479,5662,5694,5696,5697,5718,6062,6064,8559,8799,8911,9063,9399,9400,9415,9427,9575,9624,9626,9837,10140,10860,11588,11589,13959,13960,14099,14101,14124,14255,14677,14678,14833,14836,14838,14839,14962,15574,15852,15946,15994,16015,16021,16022,16121,16122,16157,16169,16170,16216,16217,16338,16353,16354,16680,16768,16769,16949,17001,17028,17174,17194,17199,17399,17624,17680,17720,17811,17923,17924,17925,17928,17935,18192,18227,18228,18234,18235,18282,18380,18381,18423,18489,18494,18495,18496,18522,18533,18534,18535,18674,18741,19195,19250,19277,19279,19280,19309,19349,19353,19354,19355,19492,19497,19498,19515,19516,19517,19518,19589,952,8912,9028,10874,10875,10877,19629)
GROUP BY subtyp2 |