Engineersmind corp interview question

Sql joins and python dictionary