select * from Passenger;
alter table Passenger Add Age int;
select * from Passenger;
update Passenger set Age=17
where ID_psg=4;
select * from Passenger;
Select AVG(Age) AS keskmineVanus
from Passenger
select COUNT(*) as Kogus
from Company
--количество путешествий с группировкой по названию самолета
SELECT plane, COUNT(plane) AS Kogus
FROM Trip
GROUP by plane
--продолжительность путешествия
SELECT town_from, town_to, time_out, time_in,
Cast (([time_in]-[time_out]) as int)AS Kestvus
FROM trip
select c.name,t.plane
from Company as c, Trip AS t
where c.ID_Comp=t.ID_Comp
select c.name, t.plane
from Company as c INNER JOIN Trip as t
on c.ID_Comp=t.ID_Comp
where t.town_from like 'Tallinn'
select pa.name, p.place, t.town_to
from Trip as t, Pass_in_trip as p, Passenger as pa
where t.trip_no=p.trip_no and
p.ID_psg=pa.ID_psg and
pa.name like 'Anna%'
insert into Kodakondus(ID_kod, rahvus, name, ID_psg)
values(4,'Eestlane','Anna',4)
select * from Kodakondus