Assegnate 3 su 5 stelle

Sichten (views):

a)

Create view Sicht_a (KFZNR, anzahl_reservierungen)
as Select f.KFZNR, Count(r.fnr)
from fahrzeuge f left outer join reservierung r
on f.fnr = r.fnr

group by f.kfznr order by 1;

Select * from Sicht_a

b)

Create view Sicht_b (Name)
as Select kname
from kunden
where knr Not IN (Select knr from reservierung)
And knr Not In (Select knr from vermietung);

Select * from Sicht_b;

c)

Create view Sicht_c (fnr, bis, abholung)
as Select distinct f.fnr, v.bis, r.abholung
from fahrzeuge f inner join vermietung v
on f.fnr = v.fnr
inner join reservierung r
on f.fnr = r.fnr

where v.bis > r.abholung;

Select * from Sicht_c

Questo utente ha inserito 5 recensioni precedenti su questo componente aggiuntivo.