Emplay interview question

They gave a simple python and SQL program