select * from EBAY_CATE_PUB s where LEAFCATEGORY = 1start with CATEGORYPARENTID = 870 connect by prior CATEGORYID = CATEGORYPARENTID and LEAFCATEGORY = 1 ;