SQL |
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='BIKE TOOLS' and subtyp1='Shop Tools' and upper(subtyp2)<>'EMPTY' and style_id IN (2509,6424,6576,6578,7016,7194,7496,7738,10400,10641,14081,14147,15461,18402,18652,19206,19228,19669,19764,19796,19872,19898,19899,20311,20638,20746,20747,20748)
GROUP BY subtyp2 |