Comando 1
select distinct Nome
from Tipos_Artefatos, Artefatos
where Codigo = Tipo
and Tipo > 10
order by Nome;
Comando 2
select t1.Nome, t2.Nome, t3.Nome
from Projetos t1, Tipos_Artefatos t2,
Desenvolvedores t3, Artefatos t4
where t1.Codigo = t4.Projeto
and t2.Codigo = t4.Tipo
and t3.Matricula = t4.Desenvolvedor
order by t1.Nome, t2.Nome, t2.Nome;
Comando 3
select Nome, Especialidade
from Desenvolvedores
where Matricula in (
select Desenvolvedor
from Artefatos
group by Desenvolvedor
having Sum(Duracao) > 2)
order by Nome, Especialidade;
Considerando as tabelas e os comandos SQL acima, julgue o próximo item.
O seguinte comando SQL cria corretamente a tabela Tipos_Artefatos.
create table Tipos_Artefatos
(Codigo int null,
Nome varchar,
primary key (Nome));