I have this relationship diagram, I want to show the names of the teachers and the name of the subjects they taught. I have seen that with some query Join can be done but I have tried several and it throws me an error or shows me only the names of the teachers:
Select NombreProf, NombreAsig
from profesor
inner join asignatura on profesor.RutProf
in imparte = asignatura.idAsignatura in imparte.
How should the sql query be in this case?