Ver originalSELECT *FROM tabla1 T1 LEFT JOIN tabla1 T2 ON T1.id = T2.idpadreORDER BY T1.id, T2.idpadre