Dayal Group interview question

Sql basic questions, with puzzle questions.