Laboratório 1: Respostas 1. Select Nome, Cargo From Funcionario Where salario between 2000 and 3000 2. Select Nome, Cargo From Funcionario Where salario not between 1000 and 2000 3. Select codigo From Funcionario Where nome like ‘%Silva%’ 4. Select Codigo From Funcionario Where nome like ‘%Silva’ 5. Select F.nome, D.nome From funcionario F, departamento D Where F.Depto = D.codigo 6. Select nome From funcionario Where cargo = ‘programador’ and salario >some (select salario from funcionario where cargo=‘analista’) 7. Select AVG(salario) From funcionario 8. Select MAX(salario) From funcionario 9. Select MIN(salario) From funcionario 10. Select nome From funcionario Where salario>(select AVG(salario) from funcionário ) 11. Select nome From funcionario Where salario = (select MAX(salario) from funcionário ) 12. Select count(*) From funcionario Where salario < (select AVG(salario) from funcionario) 13. Select Count(distinct depto) From funcionario 14. Select depto, sum(salario) From funcionario Group by depto 15. Select depto, count(*) From funcionario Group by Depto Having sum(salario) > 6500 16. Select depto, Sum(Salario) From funcionario Group by depto Having count(*) > 2 Order by depto desc