Magna Concursos
644526 Ano: 2017
Disciplina: TI - Banco de Dados
Banca: Col. Pedro II
Orgão: Col. Pedro II
Provas:
Considere o seguinte banco de dados:
Professor (Nome, Código, I.D., Salário) Aluno (Nome, Matrícula, Data-Nasc, Endereço) Disciplina (Nome, Código, Horas-Semanais) Leciona (Código-Prof, Código-Discip) Matriculado-em (Matrícula, Código-Discip, Nota)
Foram propostos os seguintes comandos em SQL para obter os dados do aluno (Tabela Aluno) que obteve a maior nota na disciplina de nome “Lógica”.
I. select * from aluno where matricula in (select matricula from matriculado_em where nota in (select MAX(nota)from matriculado_em where cod_disc in (select codigo from disciplina where nome = 'Lógica'))); II. select * from aluno where matricula in (select MAX(nota) from matriculado_em where cod_disc in (select codigo from disciplina where nome = 'Lógica')); III.select aluno.* from aluno, matriculado_em where aluno.matricula=matriculado_em.matricula and nota in (select MAX(nota)from matriculado_em where cod_disc in (select codigo from disciplina where nome = 'Lógica')); IV. select aluno.*, MAX(nota) from aluno, matriculado_em where cod_disc in (select codigo from disciplina where nome = 'Lógica')
Os comandos corretos são
 

Provas

Questão presente nas seguintes provas

Analista de TI

70 Questões