I have a problem with the following query
Select nombre, codigo_cita, nombre_sede, fecha_cita, hora_cita,
codigo_sedeFK, codigo_sede
from pacientes as u
JOIN citas as h
on h.codigo_docenteFK = u.codigo_docente //hasta acá todo bien
join sede as I
ON I.codigo_sede = 1
As I insert the headquarters join, it is supposed to return only the data where the headquarters is = 1. But what it generates is that it assigns in some way it assigns all appointments that its headquarters is the 1 that equals a Heredia ... Thanks