TresVista Interview Question

Python basics ,sql queries and puzzles.