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,1859,1890,1905,1906,1907,1928,1936,1944,1946,2196,3260,8854,14732,14734,14737,14738,15196,15638,15643,15732,15743,15744,15745,15746,15747,15748,15749,15914,16148,16787,16959,17348,17349,18137,18190,18336,19079,19082,19253,19875,19879,20134,20268,21647,1615)
GROUP BY subtyp2 |