Tredence interview question

SQL questions,