Professional Documents
Culture Documents
Baze de date
Problema 1:
b) select medic from consultatii
where to_date(data_consult,'dd/mon/yyyy')='01/dec/12' ;
c) select sum(b.pret) as "Suma platita" from pacienti a,consultatii b .
where a.cnp=b.cnp and trim(upper(a.nume))='GEORGESCU PAUL'
Problema 2:
b) select b.nume,b.prenume from destinatii a,clienti2 b
Problema 3:
b) select a.nume,a.prenume,b.data_inregistrarii as"Data inregistrarii " from abonati
a,interventii b
where a.cnp=b.cnp and to_date(data_inregistrarii,'dd/mon/yyyy')= '1/jan/2013' ;
c) select data_inregistrarii,termen_limita from interventii
where trim(upper(stare))='NEEFECTUAT' .
Problema 4: NU
Problema 5:
b) select a.nume,a.adresa,b.nume_caine as "Numele cainelui" ,b.premiu from stapani
a,caini b
where a.cnp=b.cnp and trim(lower(a.nume))='vladoi cristinel' ;
c) select a.nume as"Numele stapanului",b.nume_caine as"Numele cainelui",b.premiu from
stapani a,caini b
where a.cnp=b.cnp
order by b.premiu .
Problema 6:
b) select b.nume,a.denumire,b.data_nasterii from specii a,animale b
Rezolvari Atestat:Baze de Date
Problema 7:
b)-----;
c) select a.denumire,a.capitala,b.populatie,b.nume as"Numele orasului" from tari a,orase b
where a.cod_t=b.cod_t and b.populatie in ((select min(populatie) from orase) , (select
max(populatie) from orase)) .
Problema 8:
b) select a.nume,a.prenume,b.denumire as"Reclama" from clienti a,reclame b
where a.idc=b.idc
order by a.nume asc ;
c) select a.nume,a.prenume,a.adresa from clienti a,reclame b
where a.idc=b.idc and b.nr_difuzari=(select max(nr_difuzari) from reclame) .
Problema 9:
b)-----;
c) select sum(a.locuri)as "Numar de persoane" from masini a,curse b
where a.id=b.idm and to_char(b.data_plecarii,'dd/mon/yy'y)='01/May/2013' .
Problema 10:
b) select b.titlu,b.autor,b.pret from edituri a,carti b
order by b.titlu ;
Problema 11:
b) select a.denumire as"Departament",b.nume as"Coordonator" from departamente
a,angajati b
Rezolvari Atestat:Baze de Date
where a.cod=b.cod
group by a.denumire .
Problema 13:
b) select a.adresa,b.etaj as "Etaj",b.cod as"Numarul" from cladiri a,apartamente b
Problema 14:
b) select a.denumire,avg(b.varsta) as"Media" from cluburi a,sportivi b
where a.cod=b.cod_club
group by a.denumire
order by a.denumire;
order by b.nume .
Problema 15:
b) select b.nume,b.prenume,a.suma_restanta from locatari b,apartamente15 a
order by nume .
Problema 16:NU
Rezolvari Atestat:Baze de Date
Problema 17:
b) select a.nume,b.nume as "echipa" from jucatori a,echipe b
where a.code=b.code
group by b.nume .
Problema 18:
b) select b.nume,b.prenume,b.absente,a.tip from burse a,elevi18 b
where a.id=b.id
group by a.tip .
Problema 21:
b) select nume,pret from rechizite
where a.id=b.idr
group by a.nume .
Problema 22:
b) select destinatie,durata from excursii
where a.id=b.ide
Problema 23:
b) select a.nume,a.prenume,a.nr_tel from mecanici a,masini23 b
Problema 25:
b) select a.titlu,b.nume,a.domeniu from publicatii a,abonamente b
order by b.nume ;
c) select a.id as”Cod publicatie”,a.titlu as “Titlu publicatie”,a.domeniu as”Domeniul tratat”
,a.pret as”Pretul”,a.pret+(a.pret*24/100) as”Pret cu TVA” from publicatii a,abonamente b .
Problema 26:NU
Problema 27:
b)select a.denumire as”Denumirea proiectului”,b.buget as”Buget
vechi”,b.buget+10/100*buget as”Buget nou” from proiecte a,participant b
where a.id=b.idp ;
c)select denumire,data from proiecte
where to_char(data,’dd/mon/yyyy’)=’dd/mon/2009’.
Problema 28 :
b) select b.prenume,a.clasa from diriginti a,elevi b
where .id=b.ide and trim(lower(a.clasa))=’9b’ ;
c) select b.numea as “Nume elev”,b.prenume as “Prenume elev”,a.nume as “Nume diriginte”
,a.prenume as “Prenume diriginte” from diriginti a,elevi b
where a.id=b.ide and a.specializare=:Specializarea
order by b.nume asc .
Problema 29:
b) select b.titlu as”Titlul filmului”,b.buget as”Bugetul”,b.an as”Anul aparitiei”,a.nume as
“Numele regizorului” from regizori a,filme b
where a.id=b.idf and buget<30000
Rezolvari Atestat:Baze de Date
Problema 30 :
b) select b.nume,b.salariu,a.denumire as”Aria curricular” from arii a,profesori b
where a.cod=b.cod and premiu=NULL ;
c) select min(b.salariu) as”Salariul minim”,max(b.salariu) as “Salariul maxim”,a.denumire as
“Aria curricular” from arii a,profesori b
where a.cod=b.cod
group by a.denumire .