I'm writing to see what's wrong with this query:
Name of the teacher who teaches all subjects first
select
nombre
from profesor inner join imparte on (profesor.p# = imparte.p#)
group by nombre
having (curso like "primero")
I'm writing to see what's wrong with this query:
Name of the teacher who teaches all subjects first
select
nombre
from profesor inner join imparte on (profesor.p# = imparte.p#)
group by nombre
having (curso like "primero")
The having clause works when you use a grouping. According to the query you posted, you should use a where
SELECT
nombre
FROM profesor INNER JOIN imparte ON (profesor.p# = imparte.p#)
WHERE curso LIKE 'primero'
curso = 'primero'
curso
must specify which table it comes from, it is to avoid ambiguities. Review the having clause to get an idea of the use of groupings.