Pergunta de entrevista da empresa Just Logic Software

sql query to solve and python question