Procura

Banco de dadosSql


EXERCÍCIOS - Exercício 226

  • (UFPel-CES 2015)

Considerando as tabelas aluno e nota abaixo:

matricula     nome

1           Antonio

2            Carlos

seq     matricula      codDisciplina    valor

1              1                        1                 7.5

1              2                        1                   5

2              1                        1                   8

2              2                        1                   5

O comando SQL que retorna “Antonio 7.75” é, respectivamente:




A) SELECT nome, avg(valor) FROM nota, aluno WHERE nota.matricula = aluno.matricula group by aluno.matricula having avg(valor) > 5.

B) SELECT nome, avg(valor) FROM nota, aluno WHERE nota.matricula = aluno.matricula group by aluno.matricula.

C) SELECT nome, avg(valor) FROM nota, aluno WHERE nota.matricula = aluno.matricula and avg(valor) > 5 .

D) SELECT nome, sum(valor) FROM nota, aluno WHERE nota.matricula = aluno.matricula group by aluno.matricula having sum(valor) < 10.

E) SELECT nome, avg(valor) FROM nota, aluno WHERE avg(valor) > 5.


Próximo:
EXERCÍCIOS - Exercício 227

Vamos para o Anterior: Exercício 225

Tente Este: Exercício 368

Primeiro: Exercício 1

VOLTAR ao índice: Banco de dados






Cadastre-se e ganhe o primeiro capítulo do livro.
+
((ts_substr_ig=0.00ms))((ts_substr_id=2.03ms))((ts_substr_m2=0.00ms))((ts_substr_p2=0.55ms))((ts_substr_c=1.68ms))((ts_substr_im=0.96ms))
((total= 5ms))