Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- alun.nome, (SELECT AVG(hist_aux.nota) FROM HISTORICO hist_aux WHERE alun.matricula = hist_aux.matricula) AS Media
- FROM
- HISTORICO hist,
- ALUNO alun,
- TURMA turma
- WHERE
- alun.matricula = hist.matricula AND
- hist.cod_turma = turma.cod_turma AND
- turma.ano = 2013
- ORDER BY Media DESC;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement