Parsing this query to get a list of list table names in the order where they appear in the query: SELECT tbl.fk_id, tbl.etape FROM (tbl JOIN ( SELECT tbl_1.fk_id, max(tbl_1.date1) AS max_1 FROM tbl ...