Tredence interview question

python , sql question