The query below will pull the first ten levels of folders from the Test Plan module. If you have more than ten levels in your Test Plan, you will need to add the appropriate additional number of levels into the query.
SELECT
AL1.al_description, AL2.al_description, AL3.al_description, AL4.al_description, AL5.al_description, AL6.al_description, AL7.al_description, AL8.al_description, AL9.al_description, AL10.al_description
FROM ALL_LISTS AL1
FULL OUTER JOIN ALL_LISTS al2 on al2.al_father_id = al1.al_item_id
FULL OUTER JOIN ALL_LISTS al3 on al3.al_father_id = al2.al_item_id
FULL OUTER JOIN ALL_LISTS al4 on al4.al_father_id = al3.al_item_id
FULL OUTER JOIN ALL_LISTS al5 on al5.al_father_id = al4.al_item_id
FULL OUTER JOIN ALL_LISTS al6 on al6.al_father_id = al5.al_item_id
FULL OUTER JOIN ALL_LISTS al7 on al7.al_father_id = al6.al_item_id
FULL OUTER JOIN ALL_LISTS al8 on al8.al_father_id = al7.al_item_id
FULL OUTER JOIN ALL_LISTS al9 on al9.al_father_id = al8.al_item_id
FULL OUTER JOIN ALL_LISTS al10 on al10.al_father_id = al9.al_item_id
WHERE al1.AL_DESCRIPTION = 'Subject'
ORDER BY al1.AL_VIEW_ORDER ASC