Domanda di colloquio di Just Logic Software

sql query to solve and python question