Accenture interview question

sql query