Skip to content

Instantly share code, notes, and snippets.

@vxf
Created December 9, 2017 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vxf/00d7ab5c805138a5bb2453bed9630434 to your computer and use it in GitHub Desktop.
Save vxf/00d7ab5c805138a5bb2453bed9630434 to your computer and use it in GitHub Desktop.
SELECT Aluno.numero, Aluno.nome, SUM(Classificacao.nota >= 10.0) FROM Aluno
JOIN Classificacao ON Classificacao.id_aluno=Aluno.id
JOIN UC ON UC.id=Classificacao.id_uc and UC.id_area=1
GROUP BY Aluno.id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment