Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Lista 1 SQL
- Questao 1*/
- select * from funcionario
- where nome like '%i%' and genero = 'm';
- /* Questao 2*/
- select
- sum(valorUnd) as SomaProduto
- from
- produto;
- /*Questao 3*/
- select cpf from funcionario
- where bairro like 's%' and year(datanasc) < 1980;
- /*Questao 4*/
- select * from dependente
- where year(curdate())-year(datanasc) > 8 and genero is not null;
- SELECT * from dependente
- where year(from_days(datediff(curdate(),datanasc)))>8 and genero is not null;
- /*Questao 5*/
- select * from funcionario
- order by nome, bairro desc;
- /*Questao 6*/
- SELECT * from funcionario
- where year(from_days(datediff(curdate(),datanasc)))>20 and salario>2000;
- /*Questao 7*/
- select * from produto
- where nome like 't%a';
- /*Questao 8*/
- select * from funcionario
- where year(datanasc)>=1960 and year(datanasc) <= 1990 and bairro <> 'Pituba' and tel is null;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement