select * from
(Select distinct name,categoryId,parentid,sort_order From shop_category START WITH parentid IS NULL
Connect by parentid = prior categoryId order by sort_order)
Start with parentid IS NULL Connect by parentid = prior categoryId
(Select distinct name,categoryId,parentid,sort_order From shop_category START WITH parentid IS NULL
Connect by parentid = prior categoryId order by sort_order)
Start with parentid IS NULL Connect by parentid = prior categoryId