Pular para o conteúdo principal

Questão de Banco de Dados — SQL — FGV 2015

Banco de DadosSQL
Código
fg019420
Banca
FGV
Órgão
TJ-PI
Ano
2015
Nível
Superior
Cargo
Analista Judiciário - Analista de Sistemas / Banco de Dados
O SQL que Thiago deve usar é:
  1. Aselect COUNT(*), p1.piloto from F1 p1, F1 p2 where p1.pontos > p2.pontos group by p1.piloto order by 1
  2. Bselect k+1,p1.piloto from F1 p1, k=0 order by p1.pontos
  3. Cselect (select COUNT(*) from F1where F1.pontos > p1.pontos),p1.pilotofrom F1 p1order by 1
  4. Dselect COUNT(*), p1.pilotofrom F1 p1, F1 p2, F1 p3where p1.pontos <= p2.pontosand p3.pontos > p1.pontosgroup by p1.pilotoorder by 1
  5. Eselect COUNT(*), p1.pilotofrom F1 p1, F1 p2where p1.pontos <= p2.pontosgroup by p1.pilotoorder by 1
Revelar gabarito e comentário

GabaritoE — select COUNT(*), p1.piloto from F1 p1, F1 p2 where p1.pontos <= p2.pontos group by p1.piloto order by 1

Link permanente: /questoes/fg019420