Visa Inc. interview question

SQL question based on joins and sub-query