Baixe o app para aproveitar ainda mais
Prévia do material em texto
QUESTÃO 1 - PROVA 1 select jg.nome from clube cl, jogador jg, jogador_jogo jj, jogo j where cl.idclube = jg.clube_idclube and jg.idjogador = jj.jogador_idjogador and jj.jogo_idjogo = j.idjogo and cl.nome = 'Paysandu' and j.datajogo = '2015/03/29'; QUESTÃO 2 - PROVA 1 select vencedor, count(*) from jogo where year(datajogo) = 2015 group by vencedor; QUESTÃO 3 - PROVA 1 select cl.nome from clube cl, tecnico_clube tc, tecnico t where cl.idclube = tc.clube_idclube and tc.clube_idclube = t.idtecnico and t.nome = 'Sidney Moraes' and year(dtinicio) = 2015; QUESTÃO 4 - PROVA 1 select from jogo where vencedor != 'Remo'; QUESTÃO 1 - PROVA 2 select ar.nome from arbitro ar, arbitro_has_jogo aj, jogo j where ar.idarbitro = aj.arbitro_idarbitro and aj.jogo_idjogo = j.idjogo and j.datajogo = '2015/03/29'; QUESTÃO 2 - PROVA 2 select vencedor, count(*) from jogo group by vencedor having count()=1; QUESTÃO 1 - PROVA 3 select ar.nome, f.funcao, dt.datajogo from arbitro ar, arbitro_has_jogo f, jogo dt where ar.idarbitro = f.arbitro_idarbitro and f.jogo_idjogo = dt.idjogo; QUESTÃO 2 - PROVA 3 select ar.nome, f.funcao, count(*) from arbitro ar, arbitro_has_jogo f, jogo j where ar.idarbitro = f.arbitro_idarbitro and f.jogo_idjogo = j.idjogo group by ar.nome, f.funcao; QUESTÃO 1 - PROVA 4 select jg.nome, datajogo, hora, j.local, vencedor from jogador jg, jogador_jogo jj, jogo j where jg.idjogador = jj.jogador_idjogador and jj.jogo_idjogo = j.idjogo QUESTÃO 2 - PROVA 4 (NÃO SEI SE ESTÁ CERTO) select t.nome, cl.nome, count(*) from clube cl, tecnico_clube tc, tecnico t where cl.idclube = tc.clube_idclube and tc.tecnico_idtecnico = t.idtecnico group by t.nome, cl.nome
Compartilhar