SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='Outerwear' and upper(subtyp2)<>'EMPTY' and style_id IN (359,2174,3619,3641,5330,5640,5644,5645,5731,5777,8517,9392,9597,9598,9827,15698,16248,16607,16813,16827,16953,16985,17473,17854,17971,17973,18693,18742,18745,18955,18975)
GROUP BY subtyp2 |