SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='Footwear' and upper(subtyp2)<>'EMPTY' and style_id IN (1831,1890,1892,1903,1904,1905,1906,1907,1928,1944,8854,14727,15196,15197,15557,15558,15559,15560,15561,15641,15642,15732,15744,15745,15749,15914,16787,18037,18041,18042,18137,18138,18153,18154,18177,18279,18498,18924,18928,18931,18935,19082,19105,19139,19879,19951,19954,20134,1918)
GROUP BY subtyp2 |