Good morning. I have the following query:
select p.id_alumno as id,('estudiante') as tipo, p.url_imagen, concat_ws(' ',p.nombre,p.paterno,p.materno) as nombre,
e.nombre as empresa,concat_ws(' ',u.nombre,u.apellidos) as solicitante, p.fecha_alta, p.estado
from estudiantes p inner join usuarios u on p.id_alumno = u.id_usuario
inner join empresas e on u.id_empresa = e.id_empresa
and I want to apply this where
within the same query:
where tipo like 'estudiante'.
But it tells me that the field tipo
does not exist.
How could I do this search, I would really appreciate your help.
PS: I already know that the query where
will always return the same, but I have to resolve this error in order to continue what I am doing