SELECT subtyp_1, web_url
FROM tb_web_taxonomy
WHERE dept='CYCLING' and typ='COMPONENTS' and subtyp_1>'' and subtyp_2='EMPTY' and subtyp_1<>'EMPTY'
ORDER BY sort_position
query
RESULTSET
query
ITEMCOUNT
SUBTYP1
1
9
BRAKES
2
2
CHAINS
3
1
DERAILLEURS
4
2
GRIPS & BAR TAPE
5
5
PEDALS AND CLEATS
6
2
TIRES
7
2
TUBES
CACHED
false
EXECUTIONTIME
16
SQL
SELECT DISTINCT subtyp1, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CYCLING' and typ='COMPONENTS' and upper(subtyp1)<>'EMPTY' and style_id IN (6561,7310,7777,7847,7850,7884,10328,11448,14877,14976,15332,15494,17084,17092,17374,17499,17567,17568,17797,18761,18835,20559,20763)
GROUP BY subtyp1