Baixe o app para aproveitar ainda mais
Prévia do material em texto
09/11/2020 Questionário Avaliativo - Atividade de Percurso II https://virtual.ifro.edu.br/jiparana/mod/quiz/review.php?attempt=82566&cmid=59758 1/7 Painel / Meus cursos / Educação a Distância - EAD / PROGRAMA NOVOS CAMINHOS / FIC - Administrador de Banco de Dados / III - IBDSQL - FIC-ADMBD / Atividade Avaliativa de Percurso II / Questionário Avaliativo - Atividade de Percurso II Questão 1 Incorreto Atingiu 0 de 1 Questão 2 Correto Atingiu 1 de 1 Iniciado em segunda, 9 nov 2020, 08:31 Estado Finalizada Concluída em segunda, 9 nov 2020, 08:43 Tempo empregado 12 minutos 34 segundos Notas 6/15 Avaliar 20 de um máximo de 50(40%) Qual é o código SQL CORRETO para aumentar a renda em 20% dos clientes do sexo masculino e com e-mail do provedor Gmail.com e renda entre 100 e 5.000 reais. Escolha uma opção: A. Update cliente set renda_cli = (renda_cli * 1.20) where (sexo_cli = 'Masculino') and (email_cli like 'gmail.com') and (renda_cli > 100 < 5000); B. Update cliente set renda_cli = (renda_cli * 1.20) where (sexo_cli = 'Masculino') or (email_cli = '%gmail.com%') or (renda_cli = 100 and 5000); C. Update cliente set renda_cli = renda_cli * 0.20 where (email_cli like '%gmail.com%') and (renda_cli between 100 and 5000); D. Alter table cliente set renda_cli = renda_cli + (renda_cli * 0.20) where (sexo_cli = 'Masculino') and (email_cli like '%gmail.com%') and (renda_cli between 100 and 5000); E. Update cliente set renda_cli = renda_cli + (renda_cli * 0.20) where (sexo_cli = 'Masculino') and (email_cli like '%gmail.com%') and (renda_cli between 100 and 5000); Sua resposta está incorreta. A resposta correta é: Update cliente set renda_cli = renda_cli + (renda_cli * 0.20) where (sexo_cli = 'Masculino') and (email_cli like '%gmail.com%') and (renda_cli between 100 and 5000);. Qual é o código SQL CORRETO para aumentar o valor do limite em 50% nas contas correntes com data de abertura até 01/01/2016; Escolha uma opção: A. Update conta_corrente set valorLimite_Cc = (valorLimite_cc * 0.50) where (dataAbertura_cc <= '2016-01-01'); B. Alter table conta_corrente set valorLimite_Cc = valorLimite_cc + (valorLimite_cc * 0.50) where (dataAbertura_cc <= ‘01-01-2016’); C. Alter table conta_corrente set valorLimite_Cc = valorLimite_cc + (valorLimite_cc * 0,50) where dataAbertura_cc Update (dataAbertura_cc <= '2016-01-01'); D. Update conta_corrente set valorLimite_Cc = valorLimite_cc + (valorLimite_cc * 0.50) where (dataAbertura_cc <= ‘2016-01-01’); E. Update conta_corrente set valorLimite_Cc = (valorLimite_cc * 0,50) where (dataAbertura_cc >= 2016-01-01); Sua resposta está correta. A resposta correta é: Update conta_corrente set valorLimite_Cc = valorLimite_cc + (valorLimite_cc * 0.50) where (dataAbertura_cc <= ‘2016-01-01’);. https://virtual.ifro.edu.br/jiparana/my/ https://virtual.ifro.edu.br/jiparana/course/index.php?categoryid=211 https://virtual.ifro.edu.br/jiparana/course/index.php?categoryid=472 https://virtual.ifro.edu.br/jiparana/course/index.php?categoryid=531 https://virtual.ifro.edu.br/jiparana/course/view.php?id=3146 https://virtual.ifro.edu.br/jiparana/mod/quiz/view.php?id=59758 09/11/2020 Questionário Avaliativo - Atividade de Percurso II https://virtual.ifro.edu.br/jiparana/mod/quiz/review.php?attempt=82566&cmid=59758 2/7 Questão 3 Incorreto Atingiu 0 de 1 Questão 4 Incorreto Atingiu 0 de 1 Qual é o código SQL CORRETO para diminuir a taxa mensal da Conta Corrente em 10% nos cliente com a taxa mensal maior do que 20 reais e limite entre 500 e 5000 reais e saldo inicial superior a 100 reais e data de abertura menor e igual que 31/12/2015; Escolha uma opção: A. Update conta_corrente set taxaMensal_cc = taxaMensal_cc – (taxaMensal_cc * 0.10) where (taxaMensal_cc > 20) and (valorLimite_cc between 500 and 5000) and (saldoInicial_cc > 100) and (dataAbertura_cc <= ‘2015-12-31’); B. Update conta_corrente set taxaMensal_cc = taxaMensal_cc – (taxaMensal_cc * 1,10) where (taxaMensal_cc SUP(20) and (valorLimite_cc > 500 < 5000) and (saldoInicial_cc > 100) and (dataAbertura_cc <= 2015-12-31); C. Update conta_corrente set taxaMensal_cc = taxaMensal_cc – (taxaMensal_cc * 0.10) where (taxaMensal_cc > 20) or (valorLimite_cc between 500 and 5000) or (saldoInicial_cc > 100) or (dataAbertura_cc <= ‘2015-12-31’); D. Alter table conta_corrente set taxaMensal_cc = (taxaMensal_cc * 0.10) where (taxaMensal_cc > 20) or (valorLimite_cc between 500 and 5000) or (saldoInicial_cc > 100) and (dataAbertura_cc <= ‘2015-12-31’); E. Alter table conta_corrente set taxaMensal_cc = (taxaMensal_cc * 0.10) where (taxaMensal_cc > 20) and (valorLimite_cc between 500 and 5000) and (saldoInicial_cc > 100) and (dataAbertura_cc <= ‘2015-12-31’); Sua resposta está incorreta. A resposta correta é: Update conta_corrente set taxaMensal_cc = taxaMensal_cc – (taxaMensal_cc * 0.10) where (taxaMensal_cc > 20) and (valorLimite_cc between 500 and 5000) and (saldoInicial_cc > 100) and (dataAbertura_cc <= ‘2015-12-31’);. Qual é o código SQL CORRETO para deletar o saque realizado no dia 20/10/2016 com valor diferente de R$ 110,00 e realizados no caixa eletrônico. Escolha uma opção: A. Drop from saque where (data_saq = ‘2016-10-20’) and (valor_saq <> 110) and (local_saq = 'caixa eletrônico'); B. Alter table saque drop saque where (data_saq = ‘2016-10-20’) and (valor_saq << 110) and (local_saq = ‘caixa eletrônico’); C. Update saque set drop saque where (data_saq = ‘2016-10-20’) and (valor_saq <> 110) and (local_saq = ‘caixa eletrônico’); D. Delete in saque where (data_saq = ‘2016-10-20’) and (valor_saq >< 110) and (local_saq = ‘caixa eletrônico’); E. Delete from saque where (data_saq = ‘2016-10-20’) and (valor_saq <> 110) and (local_saq = 'caixa eletrônico'); Sua resposta está incorreta. A resposta correta é: Delete from saque where (data_saq = ‘2016-10-20’) and (valor_saq <> 110) and (local_saq = 'caixa eletrônico');. 09/11/2020 Questionário Avaliativo - Atividade de Percurso II https://virtual.ifro.edu.br/jiparana/mod/quiz/review.php?attempt=82566&cmid=59758 3/7 Questão 5 Incorreto Atingiu 0 de 1 Questão 6 Incorreto Atingiu 0 de 1 Questão 7 Incorreto Atingiu 0 de 1 Qual é o código SQL CORRETO para deletar os depósitos do tipo 'Cheque' com valor entre 400 e 500 reais feitos entre os dias 01/10/2016 a 31/10/2016; Escolha uma opção: A. Delete from deposito where (tipo_dep = ‘cheque’) and (valor_dep between 400 and 500) and (data_dep between ‘2016-10-01’ and ‘2016-10-31’); B. Drop from deposito where (tipo_dep = ‘cheque’) and (valor_dep between 400 and 500) and (data_dep between ‘2016-10-01’ and ‘2016-10-31’); C. Update deposito drop deposito where (tipo_dep = ‘cheque’) and (valor_dep between 400 and 500) and (data_dep between ‘2016-10-01’ or ‘2016-10-31’); D. Delete * deposito where (tipo_dep = ‘cheque’) and (valor_dep between 400 and 500) and (data_dep between ‘2016-10-01’ or ‘2016-10-31’); E. Delete from deposito where (tipo_dep = ‘cheque’) or (valor_dep between 400 and 500) or (data_dep between ‘2016-10-01’ and ‘2016-10-31’); Sua resposta está incorreta. A resposta correta é: Delete from deposito where (tipo_dep = ‘cheque’) and (valor_dep between 400 and 500) and (data_dep between ‘2016-10-01’ and ‘2016-10-31’);. Qual é o código SQL CORRETO para deletar os pagamentos feitos com Boleto e com valor menor ou igual do que 100 reais. Escolha uma opção: A. Delete from pagamento where (tipo_pag = ‘boleto’) and (valor_pag <= 100); B. Delete from pagamento where (tipo_pag = ‘boleto’) or (valor_pag = 100); C. Update pagamento drop pagamento where (tipo_pag = ‘boleto’) and (valor_pag <= 100); D. Alter table pagamento drop pagamento where (tipo_pag = ‘boleto’) and (valor_pag <= 100); E. Drop from pagamento where (tipo_pag = ‘boleto’) and (valor_pag <= 100); Sua resposta está incorreta. A resposta correta é: Delete from pagamento where (tipo_pag = ‘boleto’) and (valor_pag <= 100);. Qual é o código SQL CORRETO para selecionar todos os atributos dos clientes com os sobrenomes Silva ou Souzae do sexo feminino e com renda entre 500 e 10.000 reais e nascidos após 01/01/1980. Escolha uma opção: A. Select full atributts from cliente where (nome_cli like '%silva%' or nome_cli like '%souza%') or (sexo_cli = 'F') or (renda_cli between 500 and 10000) or (dataNasc_cli > '1980-01-01'); B. Select full from cliente where (nome_cli like 'silva' or nome_cli like 'souza') and (sexo_cli = 'F') and (renda_cli between 500 and 10000) and (dataNasc_cli > '1980-01-01'); C. Select * from cliente where (nome_cli like '%silva%' or nome_cli like '%souza%') and (sexo_cli = 'F') and (renda_cli 500 and 10000) and (dataNasc_cli > '01-01-1980'); D. Select * from cliente where (nome_cli like '%silva%' and nome_cli like '%souza%') or (sexo_cli = 'F') or (renda_cli between 500 and 10000) and (dataNasc_cli > '1980-01-01'); E. Select * from cliente where (nome_cli like '%silva%' or nome_cli like '%souza%') and (sexo_cli = 'F') and (renda_cli between 500 and 10000) and (dataNasc_cli > '1980-01-01'); Sua resposta está incorreta. A resposta correta é: Select * from cliente where (nome_cli like '%silva%' or nome_cli like '%souza%') and (sexo_cli = 'F') and (renda_cli between 500 and 10000) and (dataNasc_cli > '1980-01-01');. 09/11/2020 Questionário Avaliativo - Atividade de Percurso II https://virtual.ifro.edu.br/jiparana/mod/quiz/review.php?attempt=82566&cmid=59758 4/7 Questão 8 Incorreto Atingiu 0 de 1 Questão 9 Correto Atingiu 1 de 1 Questão 10 Incorreto Atingiu 0 de 1 Qual é o código SQL CORRETO para selecionar a maior renda entre os clientes. Escolha uma opção: A. Select max(), renda_cli from cliente; B. Select nome_cli, max(renda_cli) from cliente; C. Select nome_cli, renda_cli from cliente where renda_cli = max(renda_cli); D. select max(renda_cli) from cliente; E. Select nome_cli, max(renda_cli) from cliente where renda_cli = (select renda_cli from cliente); Sua resposta está incorreta. A resposta correta é: select max(renda_cli) from cliente;. Qual é o código SQL CORRETO para somar o saldo total de todas as contas correntes abertas entre 01/01/2010 e 31/12/2016. Escolha uma opção: A. Select count(distinct saldoTotal_cc) from conta_corrente where (dataAbertura_cc between '2010-01-01' and '2016-12-31'); B. Select max(saldoTotal_cc) from conta_corrente where (dataAbertura_cc between '2010-01-01' and '2016-12-31'); C. Select saldoTotal_cc from conta_corrente where (dataAbertura_cc between '2010-01-01' and '2016-12-31') and saldo_cc = max(saldoTotal_cc); D. Select sum(saldoTotal_cc) from conta_corrente where (dataAbertura_cc between '2010-01-01' and '2016-12-31'); E. Select sum(saldoTotal_cc) from conta_corrente where (dataAbertura_cc between '01-01-2010' and '31-12-2016'); Sua resposta está correta. A resposta correta é: Select sum(saldoTotal_cc) from conta_corrente where (dataAbertura_cc between '2010-01-01' and '2016-12-31');. Qual é o código SQL CORRETO para selecionar a menor taxa mensal entre as contas correntes. Escolha uma opção: A. Select * from conta_corrente where taxaMensal_cc = (select avg(taxaMensal_cc) from conta_corrente); B. select conta_corrente.*, min(taxaMensal_cc) from conta_corrente); C. select min(taxaMensal_cc) from conta_corrente; D. Select min(taxaMensal_cc) from conta_corrente where (taxaMensal_cc = (select * from conta_corrente); E. Select min() from conta_corrente; Sua resposta está incorreta. A resposta correta é: select min(taxaMensal_cc) from conta_corrente;. 09/11/2020 Questionário Avaliativo - Atividade de Percurso II https://virtual.ifro.edu.br/jiparana/mod/quiz/review.php?attempt=82566&cmid=59758 5/7 Questão 11 Correto Atingiu 1 de 1 Questão 12 Incorreto Atingiu 0 de 1 Qual é o código SQL CORRETO para selecionar o maior saldo inicial entre conta corrente com data abertura antes de 01/01/2019. Escolha uma opção: A. select max(saldoInicial_cc) from conta_corrente; B. select max(saldoInicial_cc) from conta_corrente where (dataabertura_cc <= '2019-01-01'); C. select * from conta_corrente where (dataabertura_cc <= '2019-01-01'); D. select saldoInicial_cc from conta_corrente where (dataabertura_cc <= '2019-01-01'); E. select max(), saldoInicial_ccfrom conta_corrente where (dataabertura_cc <= '2019-01-01'); Sua resposta está correta. A resposta correta é: select max(saldoInicial_cc) from conta_corrente where (dataabertura_cc <= '2019-01-01');. Qual é o código SQL CORRETO para selecionar todos os atributos das contas correntes ordenando por data de abertura em ordem decrescente. Escolha uma opção: A. Select * from conta_corrente order by dataAbertura_cc desc; B. Select * from conta_corrente order by dataAbertura_cc; C. Select * from conta_corrente order by dataAbertura_cc > 1; D. Select * from conta_corrente order by dataAbertura_cc distinct; E. Select * from conta_corrente order by desc; Sua resposta está incorreta. A resposta correta é: Select * from conta_corrente order by dataAbertura_cc desc;. 09/11/2020 Questionário Avaliativo - Atividade de Percurso II https://virtual.ifro.edu.br/jiparana/mod/quiz/review.php?attempt=82566&cmid=59758 6/7 Questão 13 Correto Atingiu 1 de 1 Questão 14 Correto Atingiu 1 de 1 Qual é o código SQL CORRETO para mostrar o valor médio do valor de limite das contas correntes abertas após 01/01/2011; Escolha uma opção: A. Select avg(valorLimite_cc) from conta_corrente; B. Select med(valorLimite_cc) from conta_corrente where (dataAbertura_cc > '2011-01-01'); C. Select média(valorLimite_cc) from conta_corrente where (dataAbertura_cc > '01-01-2011'); D. Select avg(valorLimite_cc) from conta_corrente where (dataAbertura_cc > '2011-01-01'); E. Select * from conta_corrente where (dataAbertura_cc > '01-01-2011') and (valorLimite_cc = (Select avg(valorLimite_cc)); Sua resposta está correta. A resposta correta é: Select avg(valorLimite_cc) from conta_corrente where (dataAbertura_cc > '2011-01-01');. Qual é o código SQL CORRETO para contar quantos endereços existem na tabela cliente; Escolha uma opção: A. Select count(endereço_cli) from cliente; B. Select avg(distinct endereço_cli) from cliente; C. Select sum(endereço_cli) from cliente group by endereço_cli; D. Select count() from cliente where (endereço_cli is not null); E. Select count(endereço_cli) from cliente distinct; Sua resposta está correta. A resposta correta é: Select count(endereço_cli) from cliente;. 09/11/2020 Questionário Avaliativo - Atividade de Percurso II https://virtual.ifro.edu.br/jiparana/mod/quiz/review.php?attempt=82566&cmid=59758 7/7 Questão 15 Correto Atingiu 1 de 1 Qual é o código SQL CORRETO para selecionar os clientes com renda maior que 100 e sexo Masculino e com sobrenome 'Silva'. Escolha uma opção: a. select * from cliente where (renda_cli > 100) and (sexo = 'Masculino') and (nome_cli like '%silva%'); b. select * from cliente where (renda_cli > 100) and (sexo = 'Masculino') and (nome_cli like 'silva'); c. select (renda_cli > 100), (sexo = 'Masculino'), (nome_cli like '%silva%') from cliente; d. select * from cliente where (renda_cli > 100) and (sexo = 'Masculino') and (nome_cli like '%silva'); e. select * from cliente where (renda_cli > 100) and (sexo = 'Masculino') and (nome_cli like 'silva%'); Sua resposta está correta. A resposta correta é: select * from cliente where (renda_cli > 100) and (sexo = 'Masculino') and (nome_cli like '%silva%');. ◄ Vídeo Aula 12 - Correção da Prática de Programação com UPDATE, DELETE e SELECT: BD Mecânica Carro Zero Seguir para... Script SQL - BD Agência Bancária ► https://virtual.ifro.edu.br/jiparana/mod/url/view.php?id=59525&forceview=1 https://virtual.ifro.edu.br/jiparana/mod/resource/view.php?id=59830&forceview=1
Compartilhar