Accenture interview question

python orm queries problem solving