SELECT subtyp_2, web_url
FROM tb_web_taxonomy
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MEN''S' and subtyp_1='BOTTOMS' and subtyp_2>'' and subtyp_3='EMPTY' and subtyp_2<>'EMPTY'
ORDER BY sort_position
query
RESULTSET
query
ITEMCOUNT
SUBTYP2
1
3
ACTIVE PANTS
2
11
CASUAL PANTS
3
9
SHORTS
CACHED
false
EXECUTIONTIME
37
SQL
SELECT DISTINCT subtyp2, count(distinct style_id) as itemCount
FROM web_all_products
WHERE dept='CLOTHING AND FOOTWEAR' and typ='MENS' and subtyp1='Bottoms' and upper(subtyp2)<>'EMPTY' and style_id IN (3496,3515,3550,3637,3638,5471,6176,11316,14619,14620,16112,16832,18809,18811,21078,21080,21244,21245,21248,21256,21257)
GROUP BY subtyp2