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
1
BOLTS & MISC PARTS
2
1
BRAKE LEVERS
3
7
BRAKES
4
2
CASSETTES
5
11
CHAINS
6
3
DERAILLEURS
CACHED
false
EXECUTIONTIME
17
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 (6455,6763,6803,6811,6812,7058,7170,7201,7625,7784,7800,7847,14877,14922,15145,15854,16104,17586,17639,17796,18159,18292,19479,20069,20744)
GROUP BY subtyp1