Unknowns interview question

solve query question which base on joins