Quara Digital interview question

Join query on three tables