Macy's interview question

few SQL and 2 python questions difficulty level 2