NeenOpal interview question

Basic code in python and SQL