Analise o comando SQL a seguir.
select distinct cavalo
from TURFE
where not exists
(select *
from
( select t1.pareo, sum(1) xpto, t1.cavalo
from TURFE t1, TURFE t2
where t1.pareo = t2.pareo
and t2.tempo <= t1.tempo
group by t1.cavalo, t1.pareo) x
where TURFE.cavalo = x.cavalo
and x.xpto <> 2
)
Considerando-se a instância da tabela TURFE descrita anteriormente, a execução do comando acima exibe no resultado o(s) nome(s):
select distinct cavalo
from TURFE
where not exists
(select *
from
( select t1.pareo, sum(1) xpto, t1.cavalo
from TURFE t1, TURFE t2
where t1.pareo = t2.pareo
and t2.tempo <= t1.tempo
group by t1.cavalo, t1.pareo) x
where TURFE.cavalo = x.cavalo
and x.xpto <> 2
)
Considerando-se a instância da tabela TURFE descrita anteriormente, a execução do comando acima exibe no resultado o(s) nome(s):
- A)Capricho;
- B)Escorial;
- C)Estupenda, Escorial;
- D)Mandrake;
- E)Uramak, Muddy River.