SQL |
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='WOMENS' and upper(subtyp1)<>'EMPTY' and style_id IN (783,810,826,1825,1998,2137,2141,2160,2332,2441,2443,2445,2779,2821,3073,3080,3086,3100,3309,3314,3352,3379,3622,3690,5026,5326,5331,5638,5722,5748,5755,5771,5887,5898,6132,6133,6134,8203,8639,8679,8692,8905,8961,8962,9023,9041,9062,9147,9150,9568,10286,10397,10405,10420,11625,14068,14125,14244,14571,14612,14648,14785,14842,14929,15446,15697,15760,15883,15895,16507,16508,16581,16583,16628,16806,16808,16829,16884,16936,16961,16997,17519,17520,17609,17611,17647,17858,17860,18133,18134,18187,18413,18417,18511,18617,18656,18813,18846,18956,19008,19032,19076,19126,19142,19143,19152,19168,19186,19209,19475,19591,19613,19751,19765,19810,19997,20028,20150,20202,20211,20213,20325,20375,20490,20500,20579,20684,20686,20697,20698,20713,20877,20961,20981,21059,21066,21087,21088,21127,21238,21318,21606,21609,21873,21876,21878,21880)
GROUP BY subtyp1 |