SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='MORE...' and typ='PUBLICATIONS' and subtyp1='Maps' and upper(subtyp2)<>'EMPTY' and style_id IN (199,206,472,473,474,475,3791,3792,3820,3866,3867,4161,4167,4543,4620,4630,4642,4644,4651,4677,9489,13962,13963,13967,15220,15795,16038,16040,17253,17255,18086,19026,21092,21093,21094,4076,19504)
GROUP BY subtyp2 |