Quara Digital Interview Question

Join query on three tables