Sunteți pe pagina 1din 1

1.

scrieti o interogare care sa afiseze studentii care au note la obiectul 'den1'


mai mare decat 7 impreuna cu notele lor la obiectul 'den1'
select s.nume,s.prenume,n.nota
from studenti s,obiecte o,note_studenti n
where o.den='den1' and o.cod=n.cod and s.mat=n.mat and n.nota>7
2. Scrieti o interogare folosind subquery pentru a afisa studentii cu aceiasi no
ta cu 'nume1' la 'den1'
select distinct nume,prenume
from studenti s, note_studenti n
where n.nota=
(
select nota
from note_studenti
where cod=(
select cod
from obiecte
where den='den1'
)
and mat=(
select mat
from studenti
where nume='nume1'
)
)
and s.mat=any(
select mat
from note_studenti
where cod=any(
select cod
from obiecte
where den='den1'
)
);

S-ar putea să vă placă și