Jump to content

Exercício de base de dados


Miguelowski

Recommended Posts

http://gyazo.com/9bc112ed51c92e97e232c9b32eb3e3c1

https://gyazo.com/1374dd37b97b7f50887aa1ad787cba03
1.1.1 
Select *
from peixe
 
1.1.2
Select avg(peso) 
from peixe
 
1.1.3
Select count(n.codespecie) as Quantidade
From peixe p inner join Especie n
on p.Peixe=n.nome
where n.nome = 'carapau de corrida'
 
1.1.5 
Select *
From especies n inner join peixe p
on n.codespecie= p.codpeixe inner join Ecossistemas e
on p.codpeixe=e.nome
where e.nome ='Rio Douro'
 
Alguém me pode dizer se estão resolvidos corretamente estas 4?

E como ficaria a 1.1.4?

Edited by Miguelowski
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.