SELECT subtyp_1, web_url
FROM tb_web_taxonomy
WHERE dept='CYCLING' and typ='ACCESSORIES' and subtyp_1>'' and subtyp_2='EMPTY' and subtyp_1<>'EMPTY'
ORDER BY sort_position
query
RESULTSET
query
ITEMCOUNT
SUBTYP1
1
1
BODY PROTECTION
2
4
COOL WEATHER ACCESSORIES
3
12
GLOVES
4
7
HELMETS
CACHED
false
EXECUTIONTIME
17
SQL
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='ACCESSORIES' and upper(subtyp1)<>'EMPTY' and style_id IN (2140,5796,5802,5805,5806,5836,5895,9124,13894,14654,14685,14687,15234,15954,16396,17342,17654,18256,19235,20135,20970,21238,21459,21687,21814)
GROUP BY subtyp1