Anonymous interview question

Related to Python, SQL and Java. Easy to Medium Level