Cadernos de Questões

Provas Favoritas

Filtros Salvos

Foi encontrada 1 questão.
#2728066
Texto da Questão:

Para responder às questões de 45 a 47, considere o esquema relacional composto pelas relações:


Considere que o atributo NotaGlobal em ALUNO corresponda à média de suas notas. Um comando em SQL que atualiza este atributo para cada aluno é:

  • UPDATE ALUNO SET NotaGlobal = t.med FROM ALUNO a, (SELECT Matricula, AVG(nota) AS med FROM Registro WHERE Matricula IN (SELECT Matricula FROM ALUNO) GROUP BY Matricula ) AS t WHERE a.Matricula=t.Matricula
  • UPDATE ALUNO SET NotaGlobal = t.med FROM ALUNO a, (SELECT Matricula, MED(nota) AS med FROM Registro WHERE Matricula IN (SELECT Matricula FROM ALUNO) GROUP BY Matricula ) AS t WHERE a.Matricula = t.Matricula;
  • UPDATE ALUNO SET NotaGlobal = t.med FROM ALUNO a, (SELECT Matricula, MED(nota) AS med FROM Registro WHERE Matricula IN (SELECT Matricula FROM ALUNO)) AS t WHERE a.Matricula=t.Matricula;
  • UPDATE ALUNO SET NotaGlobal = t.med FROM ALUNO a, (SELECT Matricula, AVG(nota) AS med FROM Registro WHERE Matricula IN (SELECT Matricula FROM ALUNO)) AS t WHERE a.Matricula=t.Matricula;
Fale com IAgo
IAgo - Assistente IAProva
IA
Olá! Sou o IAgo, seu assistente aqui no IAProvatec 😊
Veja como posso te ajudar:
Agora