Envestnet interview question

advanced queries plsql