EY interview question

Sql queries , basic python