Advertisement
MiguelazoDS

Untitled

Jan 27th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.25 KB | None | 0 0
  1. SELECT CONCAT (C.titulo,' tiene ', COUNT(A.apellidos),' cursos') AS Info_profesores
  2. FROM alumnos AS A,cursos AS C, alumnos_cursos AS AC
  3. WHERE C.id_curso = AC.id_curso
  4. AND A.id_alumno = AC.id_alumno
  5. GROUP BY C.titulo
  6. HAVING COUNT(A.apellidos) = 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement