EY interview question

Sql database question and some basic about accounts.