SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and subtyp1='Accessories' and upper(subtyp2)<>'EMPTY' and style_id IN (918,930,941,946,950,953,2217,3073,3201,3206,3210,3215,3235,3379,3406,3408,5236,5242,5249,5279,5302,5312,5313,5316,5339,5479,5662,5696,6044,6045,6046,6047,6050,6054,6056,6060,6062,6063,6064,6067,8800,9400,9495,9898,9899,10762,10853,10888,10979,10981,10983,10993,11578,11588,11589,11593,13910,13960,13987,14255,14678,14929,15574,15617,15856,15895,15945,15992,16015,16021,16022,16092,16093,16094,16097,16098,16100,16126,16157,16216,16224,16301,16366,16768,16769,17001,17028,17199,17461,17620,17621,17623,17680,17811,17923,18000,18121,18124,18125,18126,18127,18187,18227,18228,18234,18235,18237,18271,18272,18375,18379,18380,18384,18386,18387,18388,18389,18390,18391,18392,18393,18394,18395,18396,18397,18398,18400,18468,18469,18532,18533,18534,18535,18793,19352,19353,19381,19382,19492,19497,19628,19630,20050,20051,20055,20264,20267,20293,20294,20295,20316,20343,20368,20369,20375,20377,20379,20381,2332,6048,6049,6052,16099,19629)
GROUP BY subtyp2 |