Tredence Interview Question

2 question of SQL : easy and hard