SelfMade interview question

python sql puzzle questions were basic related to programming. a basic program.